]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music.hh
release: 0.1.0
[lilypond.git] / lily / include / music.hh
1 /*
2   music.hh -- declare Music
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10
11 #ifndef MUSIC_HH
12 #define MUSIC_HH
13
14 #include "virtual-methods.hh"
15 #include "input.hh"
16 #include "minterval.hh"
17 #include "lily-proto.hh"
18 #include "string.hh"
19
20 /** In Lily, everything that has a length and a pitch (which can be
21   transposed) is considered "music", 
22
23   Music is hierarchical: 
24
25   @seealso Music_list
26   */
27 class Music:public Input {
28 public:
29     Music_list * parent_music_l_;
30     
31     /** what kind of iterator needed to walk this music?  This doesn't
32       make sense for simple (ie non-list) music, but it does no harm
33       here. Yes, it did harm Music_list: you can forget to copy it.
34       
35       */
36     String type_str_;
37
38     /// what name (or look for this name)
39     String id_str_;    
40
41     virtual MInterval time_int()const;
42     virtual ~Music(){}
43     void print() const;
44     virtual void transpose(Melodic_req const *);
45     virtual void translate(Moment dt);
46     VIRTUAL_COPY_CONS(Music,Music);
47     DECLARE_MY_RUNTIME_TYPEINFO;
48     Music();
49 protected:
50     virtual void do_print() const;
51   
52 };
53
54 #endif // MUSIC_HH
55
56
57