]> git.donarmstrong.com Git - lilypond.git/blob - voice.hh
release: 0.0.3
[lilypond.git] / voice.hh
1 #ifndef VOICE_HH
2 #define VOICE_HH
3
4 #include "mtime.hh"
5 #include "list.hh"
6 #include "request.hh"
7
8 /// class for  horizontal stuff.
9 struct Voice {
10     PointerList<Voice_element *> elts;
11     Mtime start;
12
13     /****************/
14     Mtime when(const Voice_element*)const;
15     Mtime last() const;
16     Voice();
17     void add(Voice_element*);
18     void print() const;
19 };
20 /**
21
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
24
25     */
26
27 struct Voicegroup {
28     /// don't know how to identify these.
29 };
30
31 /// 
32 struct Voice_element {
33     Mtime duration;
34     const Voicegroup *group;
35     const Voice *voice;
36     PointerList<Request*> reqs;
37
38     List<const Item *> granted_items;
39     List<const Spanner *> granted_spanners;
40     void add(Request*);
41     Voice_element();
42
43     void print ()const;
44 };
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
48     */
49 #endif