]> git.donarmstrong.com Git - lilypond.git/blob - hdr/staff.hh
release: 0.0.14
[lilypond.git] / hdr / staff.hh
1 #ifndef STAFF_HH
2 #define STAFF_HH
3
4 #include "staffcommands.hh"
5
6
7 /// base class for a collection of voices.
8 struct Staff {
9     /// synchronous horizontal stuff
10     IPointerList<Voice*> voices;
11
12     /// commands in chronological order
13     Staff_commands *staff_commands_;
14     
15     /// runtime field
16     IPointerList<Staff_column*> cols;
17
18     /// indirections to the Score and PScore
19     Score *score_;
20     PScore *pscore_;
21
22     /****************************************************************/
23     void add(PointerList<Voice*> &s);
24     void process_commands(Real l);
25
26     Staff(const Staff&src);
27     void add_voice(Voice *v);
28     void add_staff_column(Staff_column *sp);
29
30     Paperdef*paper()const;
31     /// interpret all requests and add items to #destination#.
32     void process();
33     /**
34     This routines calls virtual functions from Staff, to delegate the
35     interpretation of requests to a derived class of Staff */
36     void setup_staffcols();
37
38     void OK() const;
39     void print() const;
40     Real last() const;
41     void clean_cols() ;
42     Staff_column * get_col(Real,bool);
43
44     Staff();
45
46     /****************************************************************
47       VIRTUALS
48     ****************************************************************/
49
50     virtual void set_output(PScore * destination)=0;
51     virtual void walk()=0;    
52     virtual Staff_column * create_col(Score_column * )=0;
53     virtual ~Staff() { }
54 };
55 #endif
56
57