2 global-performers.cc -- implement
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 Jan Nieuwenhuizen <jan@digicash.com>
12 #include "input-translator.hh"
14 #include "performer.hh"
16 struct Performer_table_entry
{
19 Performer_table_entry (String s
, Perf_ctor f
)
24 Performer_table_entry()
30 static Array
<Performer_table_entry
> *perf_table
=0;
33 add_Performer (String s
, Perf_ctor f
)
36 perf_table
= new Array
<Performer_table_entry
>;
38 perf_table
->push (Performer_table_entry (s
, f
));
43 get_performer_p (String s
)
45 for (int i
=0; i
< perf_table
->size(); i
++)
47 if ((*perf_table
)[i
].name_str_
== s
)
48 return (*(*perf_table
)[i
].ctor_l_
)();
50 error ("Unknown performer `" + s
+"\'");