Fixes Issue 1504, allowing feather beam line breaking.
[lilypond/patrick.git] / lily / translator-group-ctors.cc
blob5bde18c6b98119804f460f2c006a3c78ee15494d
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #include "score-engraver.hh"
21 #include "score-performer.hh"
22 #include "warn.hh"
23 #include "international.hh"
26 Quick & dirty.
28 Translator_group *
29 get_translator_group (SCM sym)
31 if (sym == ly_symbol2scm ("Engraver_group"))
32 return new Engraver_group ();
33 else if (sym == ly_symbol2scm ("Performer_group"))
34 return new Performer_group ();
35 else if (sym == ly_symbol2scm ("Score_engraver"))
36 return new Score_engraver ();
37 else if (sym == ly_symbol2scm ("Score_performer"))
38 return new Score_performer ();
40 error (_f ("fatal error. Couldn't find type: %s",
41 ly_symbol2string (sym).c_str ()));
42 scm_flush (scm_current_error_port ());
43 scm_display (sym, scm_current_error_port ());
44 scm_flush (scm_current_error_port ());
46 exit (2);
48 return 0;