]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/voice.hh
release: 0.0.67
[lilypond.git] / lily / include / voice.hh
1 /*
2   voice.hh -- declare Voice
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #ifndef VOICE_HH
10 #define VOICE_HH
11
12 #include "lily-proto.hh"
13 #include "plist.hh"
14 #include "moment.hh"
15
16 /** class for  horizontal stuff.
17
18     Voice is a ordered row of Voice_elements. It is strictly
19     horizontal: you cannot have two rhythmic elements running parallel
20     in a Voice. For proper processing, each Voice should have
21     Group_change_req as a first element.
22
23     */
24
25 struct Voice {
26     /** the elements, earliest first.
27       Please use the member #add()# to add a new element
28       */
29     Pointer_list<Voice_element *> elts_;
30     Moment start_;
31
32     /* *************** */
33     Voice();
34     Voice(Voice const&);
35
36     Moment when(Voice_element const *)const;
37     Moment last() const;
38     void transpose(Melodic_req const &)const;
39     void add(Voice_element*);
40     void print() const;
41     void set_default_group(String id);
42 };
43
44 #endif