lilypond-0.0.5
[lilypond.git] / voice.hh
blobb580972b233366fd7a479dd3e4688892c0de8853
1 #ifndef VOICE_HH
2 #define VOICE_HH
5 #include "list.hh"
6 #include "request.hh"
8 /// class for horizontal stuff.
9 struct Voice {
10 PointerList<Voice_element *> elts;
11 Real start;
13 /****************/
14 Real when(const Voice_element*)const;
15 Real 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 Real 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