]> git.donarmstrong.com Git - lilypond.git/blob - lily/translator-group-ctors.cc
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / translator-group-ctors.cc
1 /*
2   translator-group-ctors.cc -- implement Translator_group factory.
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #include "score-engraver.hh"
10 #include "score-performer.hh"
11 #include "warn.hh"
12
13 /*
14   Quick & dirty.
15 */
16 Translator_group *
17 get_translator_group (SCM sym)
18 {
19   if (sym == ly_symbol2scm ("Engraver_group"))
20     return new Engraver_group ();
21   else if (sym == ly_symbol2scm ("Performer_group"))
22     return new Performer_group ();
23   else if (sym == ly_symbol2scm ("Score_engraver"))
24     return new Score_engraver ();
25   else if (sym == ly_symbol2scm ("Score_performer"))
26     return new Score_performer ();
27
28   programming_error ("Couldn't find type");
29   scm_flush (scm_current_error_port ());
30   scm_display (sym, scm_current_error_port ());
31   scm_flush (scm_current_error_port ());
32   
33   assert (0);
34   return 0;
35 }