]> git.donarmstrong.com Git - lilypond.git/blob - hdr/voice.hh
release: 0.0.11
[lilypond.git] / hdr / voice.hh
1 #ifndef VOICE_HH
2 #define VOICE_HH
3
4
5 #include "plist.hh"
6 #include "request.hh"
7
8 /// class for  horizontal stuff.
9 struct Voice {
10     IPointerList<Voice_element *> elts;
11     Real start;
12
13     /****************/
14     Real when(const Voice_element*)const;
15     Real last() const;
16     Voice();
17     Voice(Voice const&);
18     void add(Voice_element*);
19     void print() const;
20 };
21 /**
22
23     Voice is a ordered row of Voice_elements. It is strictly horizontal:
24     you cannot have two rhythmic elements running parallel in a Voice
25
26     */
27
28 struct Voicegroup {
29     /// don't know how to identify these.
30 };
31
32 /// one horizontal bit. 
33 struct Voice_element {
34     Real duration;
35     const Voicegroup *group;
36     const Voice *voice_;
37     IPointerList<Request*> reqs;
38
39    PointerList<const Item *> granted_items;
40     PointerList<const Spanner *> granted_spanners;
41
42     /****************/
43     
44     void add(Request*);
45     Voice_element();
46     Voice_element(Voice_element const & src );
47     void print ()const;
48 };
49 /** Apart from being a container for the requests, Voice_element is
50     glue between related items and spanners, between requests and
51     (voice)groups
52     */
53 #endif