]> git.donarmstrong.com Git - lilypond.git/blob - hdr/inputcommands.hh
6457c1c686f04aac4f3d594ceff6ba7c3c1abe8b
[lilypond.git] / hdr / inputcommands.hh
1 /*
2   inputcommands.hh -- part of LilyPond
3
4   (c) 1996,97 Han-Wen Nienhuys
5 */
6
7 #ifndef INPUTCOMMANDS_HH
8 #define INPUTCOMMANDS_HH
9
10 #include "pcursor.hh"
11 #include "proto.hh"
12 #include "plist.hh"
13 #include "real.hh"
14 #include "timedescription.hh"
15
16 struct Commands_at : public IPointerList<Input_command*> {
17     Time_description tdescription_;
18     
19     /****************/
20
21     Moment when();
22     void parse(Staff_commands_at*);
23     void print() const;
24     Moment barleft();
25     void add(Input_command*);
26     void setpartial(Moment);
27     Commands_at(const Commands_at&);
28     Commands_at(Moment, Commands_at*prev);
29 };
30
31 struct Input_cursor : public PCursor<Commands_at*>
32 {
33     /****************/
34     Input_cursor(PCursor<Commands_at*>);
35     Moment when()const;
36     void find_moment(Moment w);
37     void prev() { operator --(0); }
38     void next() { operator ++(0); }    
39 };
40
41 /// the list of commands in Score
42 struct Input_commands : public IPointerList<Commands_at*> {    
43     Input_cursor ptr;
44     
45     /****************/
46
47     void find_moment(Moment);
48     void add(Input_command c,Assoc<String,Moment> &marks_assoc_r);
49     void do_skip(int bars, Moment wholes);
50         
51     Input_commands();
52     Input_commands(Input_commands const&);
53
54     void reset();
55     void print()const;
56     void parse(Staff *) const;
57 };
58
59 #endif // INPUTCOMMANDS_HH
60