lilypond-0.0.9
[lilypond.git] / staff.hh
blobcca8c35266412d745ca8397dc92c174bcbfdf507
1 #ifndef STAFF_HH
2 #define STAFF_HH
4 #include "score.hh"
5 #include "voice.hh"
6 #include "command.hh"
9 /// base class for a collection of voices.
10 struct Staff {
11 /// synchronous horizontal stuff
12 PointerList<Voice*> voices;
14 /// commands in chronological order
15 PointerList<Command *> commands;
16 PointerList<Staff_column*> cols;
18 /// indirections to the Score and PScore
19 Score *score_;
20 PScore *pscore_;
22 void add_voice(Voice *v);
23 void add_staff_column(Staff_column *sp);
26 /// interpret all requests and add items to #destination#.
27 void process();
28 /**
29 This routines calls virtual functions from Staff, to delegate the
30 interpretation of requests to a derived class of Staff */
33 /****************************************************************
34 VIRTUALS
35 ****************************************************************/
37 void setup_staffcols();
39 virtual void set_output(PScore * destination)=0;
40 virtual void grant_requests()=0;
42 Staff_column * get_col(Mtime,bool);
44 void add_commands(PointerList<Command* >const & sv);
45 /**
46 add all commands from sv.
48 PRE
49 sv is time-ordered.
51 virtual Staff_column * create_col(Score_column * )=0;
53 void OK() const;
54 void print() const;
55 Mtime last() const;
56 void clean_cols() ;
57 virtual ~Staff() { }
59 #endif