2 translator-group-ctors.cc -- implement Translator_group factory.
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #include "score-engraver.hh"
10 #include "score-performer.hh"
12 #include "international.hh"
18 get_translator_group (SCM sym
)
20 if (sym
== ly_symbol2scm ("Engraver_group"))
21 return new Engraver_group ();
22 else if (sym
== ly_symbol2scm ("Performer_group"))
23 return new Performer_group ();
24 else if (sym
== ly_symbol2scm ("Score_engraver"))
25 return new Score_engraver ();
26 else if (sym
== ly_symbol2scm ("Score_performer"))
27 return new Score_performer ();
29 error (_f ("fatal error. Couldn't find type: %s",
30 ly_symbol2string (sym
).c_str ()));
31 scm_flush (scm_current_error_port ());
32 scm_display (sym
, scm_current_error_port ());
33 scm_flush (scm_current_error_port ());