lilypond-0.0.1
[lilypond.git] / voice.hh
blob35537525ece1630ddc731472840a4bd8a5d7a941
1 #ifndef VOICE_HH
2 #define VOICE_HH
4 #include "mtime.hh"
5 #include "list.hh"
6 #include "request.hh"
8 /// class for horizontal stuff.
9 struct Voice {
10 PointerList<Voice_element *> elts;
11 Mtime start;
13 /****************/
14 Mtime when(const Voice_element*)const;
15 Mtime last() const;
16 Voice();
17 void add(Voice_element*);
18 void print() const;
20 /**
22 Voice is a ordered row of Voice_elements. It is strictly horizontal:
23 you cannot have two rhythmic elements running parallel in a Voice
27 struct Voicegroup {
28 /// don't know how to identify these.
31 ///
32 struct Voice_element {
33 Mtime duration;
34 const Voicegroup *group;
35 const Voice *voice;
36 PointerList<Request*> reqs;
38 List<const Item *> granted_items;
39 List<const Spanner *> granted_spanners;
40 void add(Request*);
41 Voice_element();
43 void print ()const;
45 /** Apart from being a container for the requests, Voice_element is
46 glue between related items and spanners, between requests and
47 (voice)groups
49 #endif