]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.17
authorfred <fred>
Sat, 14 Dec 1996 12:05:15 +0000 (12:05 +0000)
committerfred <fred>
Sat, 14 Dec 1996 12:05:15 +0000 (12:05 +0000)
hdr/inputcommands.hh

index 083c830aa9d0899f39bb89e3e446ae2dde523810..c5b594359bae015a45fe7c1026940e7050077f41 100644 (file)
@@ -6,58 +6,64 @@
 
 #ifndef INPUTCOMMANDS_HH
 #define INPUTCOMMANDS_HH
+
 #include "pcursor.hh"
 #include "proto.hh"
 #include "plist.hh"
 #include "real.hh"
 
+struct Commands_at : public IPointerList<Input_command*> {
+    Real when;
 
-struct Input_cursor : public PCursor<Input_command*>
-{
     /// current measure info
     Real whole_per_measure;
 
     /// where am i 
     Real whole_in_measure;
-
-    /// Real last when which was read
-    Real last;
     
-    int bars;
+    /// idem
     
-    Input_cursor(PCursor<Input_command*>);
-    /// hmm. not safe. Should rethink cursor.
-    void operator++(int);
-    /** warning: no optor -- () defined.. */
-    void reset();
-    Real when()const;
+    int bars;
+
+    /****************/
+    void print() const;
+    Real barleft();
     void add(Input_command*);
     void setpartial(Real);
-    void addbot(Input_command*);
-    void sync();
-    void print()const;   
-    void last_command_here();
+    Commands_at(const Commands_at&);
+    Commands_at(Real, Commands_at*prev);
+};
+
+struct Input_cursor : public PCursor<Commands_at*>
+{
+    /****************/
+    Input_cursor(PCursor<Commands_at*>);
+    Real when()const;
+    void find_moment(Real w);
+    void prev() { operator --(0); }
+    void next() { operator ++(0); }    
 };
 
 /// the list of commands in Score
-struct Input_commands : public IPointerList<Input_command*> {
+struct Input_commands : public IPointerList<Commands_at*> {    
     Input_cursor ptr;
-
+    
     /****************/
 
     void find_moment(Real);
-    void do_skip(int & bars, Real & wholes);
-    void truncate(Real);
-    
+    void add(Input_command c);
+    void do_skip(int bars, Real wholes);
+        
     Input_commands();
     Input_commands(Input_commands const&);
-    void add(Input_command);
+
     void reset();
     void print()const;
     Staff_commands *parse() const;
 };
 
 
+
 void
 interpret_meter(Input_command *c, int &beats_per_meas, int& one_beat,
                Real& whole_per_measure);