]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music-constructor.hh
2003 -> 2004
[lilypond.git] / lily / include / music-constructor.hh
1 /*   
2   music-constructor.hh -- declare Music_constructor
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef MUSIC_CONSTRUCTOR_HH
11 #define MUSIC_CONSTRUCTOR_HH
12
13 #include "lily-proto.hh"
14 #include "string.hh"
15 #include "global-ctor.hh"
16
17 #define ADD_MUSIC(type) \
18 Music * _ ## type ## _ctor ()\
19 {\
20   return new type;\
21 }\
22 static void  _ ## type ## _adder () {\
23       add_music_ctor (#type, & _ ## type ## _ctor);\
24 }\
25 ADD_SCM_INIT_FUNC( _ ## type ## _adder_prefix,  _ ## type ## _adder);
26
27 void add_music_ctor (String, Music* (*) ());
28 Music*make_music (String);
29
30
31
32
33
34 #endif /* MUSIC_CONSTRUCTOR_HH */
35