Use scalar instead of embedded_scm for context mod overrides.
[lilypond/mpolesky.git] / lily / translator-group-ctors.cc
blobd1d03f37f032c094860a63ef45e49aace58c0b64
1 /*
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>
7 */
9 #include "score-engraver.hh"
10 #include "score-performer.hh"
11 #include "warn.hh"
12 #include "international.hh"
15 Quick & dirty.
17 Translator_group *
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 ());
35 exit (2);
37 return 0;