]> git.donarmstrong.com Git - lilypond.git/blob - hdr/voice.hh
f63f905a0d68ae2977f4698411d6945f2d179c03
[lilypond.git] / hdr / voice.hh
1 #ifndef VOICE_HH
2 #define VOICE_HH
3
4 #include "proto.hh"
5 #include "plist.hh"
6 #include "moment.hh"
7
8 /// class for  horizontal stuff.
9 struct Voice {
10     IPointerList<Voice_element *> elts;
11     Moment start;
12
13     /****************/
14     Moment when(const Voice_element*)const;
15     Moment 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     Moment duration;
35     const Voicegroup *group;
36     const Voice *voice_;
37     IPointerList<Request*> reqs;
38
39     /****************/
40     
41     void add(Request*);
42     Voice_element();
43     Voice_element(Voice_element const & src );
44     void print ()const;
45 };
46 /** Apart from being a container for the requests, Voice_element is
47     glue between related items and spanners, between requests and
48     (voice)groups
49     */
50 #endif