2 translator-ctors.cc -- implement Translator construction
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "translator.hh"
10 #include "dictionary.hh"
14 should delete these after exit.
18 UGH. Dictionary is deprecated
20 Dictionary
<Translator
*> *global_translator_dict_p
=0;
23 add_translator (Translator
*t
)
25 if (!global_translator_dict_p
)
26 global_translator_dict_p
= new Dictionary
<Translator
*>;
28 (*global_translator_dict_p
)[classname (t
)] = t
;
32 get_translator_l (String s
)
34 if (global_translator_dict_p
->elem_b (s
))
36 Translator
* t
= (*global_translator_dict_p
)[s
];
40 error (_f ("unknown translator: `%s'", s
));