]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music-list.hh
release: 0.1.11
[lilypond.git] / lily / include / music-list.hh
1 /*
2   music-list.hh -- declare Music_list, Chord and Voice
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef MUSIC_LIST_HH
11 #define MUSIC_LIST_HH
12
13 #include "music.hh"
14 #include "plist.hh"
15
16
17 /**
18   Music can be a list of other "Music" elements
19  */
20 class Music_list : public Music {
21     
22 public:
23     int multi_level_i_;
24   
25     Music_list (Music_list const&);    
26     Music_list();
27     DECLARE_MY_RUNTIME_TYPEINFO;
28     VIRTUAL_COPY_CONS(Music_list,Music);
29     virtual void add (Music*);
30     virtual void transpose (Melodic_req const *);
31     
32     Pointer_list<Music*> music_p_list_;
33 protected:
34  
35     virtual void do_print() const;
36 };
37
38 /**
39   Chord is a list of music-elements which happen simultaneously
40  */
41
42 class Chord : public Music_list {
43 public:
44     Chord();
45     DECLARE_MY_RUNTIME_TYPEINFO;
46     VIRTUAL_COPY_CONS(Chord,Music);
47     virtual void translate (Moment dt);
48     virtual MInterval time_int() const;
49 };
50
51 /**
52   The request is a collection of Requests. A note that you enter in mudela is 
53   one Request_chord, one syllable of lyrics is one Request_chord
54  */
55 class Request_chord : public Chord {
56 public:
57     DECLARE_MY_RUNTIME_TYPEINFO;
58     Request_chord();
59     VIRTUAL_COPY_CONS(Request_chord,Music);
60 };
61
62 /**
63   Voice is a list of music-elements which are placed behind each other.
64  */
65 class Voice : public Music_list {
66     
67 public:
68     Moment offset_mom_;
69
70     Voice();
71     DECLARE_MY_RUNTIME_TYPEINFO;
72     VIRTUAL_COPY_CONS(Voice, Music);
73     virtual void translate (Moment dt);
74     virtual MInterval time_int() const;
75 };
76
77 /** A simple piece of music, which wishes to change the spot of its
78   interpretor  */
79 class Change_reg : public Music {
80 public:
81     
82     /// what kind of iterator needed to walk this music?
83     String type_str_;
84
85     /// what name (or look for this name)
86     String id_str_;
87
88     DECLARE_MY_RUNTIME_TYPEINFO;
89     VIRTUAL_COPY_CONS(Change_reg, Music);
90 };
91 #endif // MUSIC_LIST_HH