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>
10 #include "translator.hh"
11 #include "dictionary.hh"
15 should delete these after exit.
19 UGH. Dictionary is deprecated
21 Dictionary
<Translator
*> *global_translator_dict_p
=0;
24 add_translator (Translator
*t
)
26 if (!global_translator_dict_p
)
27 global_translator_dict_p
= new Dictionary
<Translator
*>;
29 (*global_translator_dict_p
)[classname (t
)] = t
;
33 get_translator_l (String s
)
35 if (global_translator_dict_p
->elem_b (s
))
37 // return (*global_translator_dict_p)[s];
38 Translator
* t
= (*global_translator_dict_p
)[s
];
42 error (_f ("unknown translator: `%s'", s
));