lilypond-0.1.16
[lilypond.git] / lily / include / global-performers.hh
blob0ed76e4c54bf6aff98041f586545fd49a3c8f57e
2 /*
3 global-performers.hh -- declare global performer stuff
5 source file of the GNU LilyPond music typesetter
7 (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
8 Jan Nieuwenhuizen <jan@digicash.com>
9 */
11 #ifndef GLOBAL_PERFORMER_HH
12 #define GLOBAL_PERFORMER_HH
14 /**
15 A macro to automate administration of performers
17 #define ADD_THIS_PERFORMER( c) \
18 struct c ## init { \
19 static Performer* globalctor() \
20 { \
21 return new c;\
22 } \
23 c ## init() \
24 { \
25 add_Performer (c::static_name(), globalctor); \
26 } \
27 } _ ## c ## init;
29 // typedef Performer*(*Perf_ctor)(void); c++ ?
30 typedef Performer*(*Perf_ctor)();
31 void add_Performer (String s, Perf_ctor f);
33 #endif // GLOBAL_PERFORMER_HH