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