~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/translator-group-ctors.cc

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 "engraver-group.hh"
 
12
#include "performer-group.hh"
 
13
#include "recording-group-engraver.hh"
 
14
#include "warn.hh"
 
15
 
 
16
/*
 
17
  Quick & dirty.
 
18
*/
 
19
Translator_group *
 
20
get_translator_group (SCM sym)
 
21
{
 
22
  if (sym == ly_symbol2scm ("Engraver_group"))
 
23
    return new Engraver_group ();
 
24
  else if (sym == ly_symbol2scm ("Performer_group"))
 
25
    return new Performer_group ();
 
26
  else if (sym == ly_symbol2scm ("Score_engraver"))
 
27
    return new Score_engraver ();
 
28
  else if (sym == ly_symbol2scm ("Score_performer"))
 
29
    return new Score_performer ();
 
30
  else if (sym == ly_symbol2scm ("Recording_group_engraver"))
 
31
    return new Recording_group_engraver ();
 
32
 
 
33
  programming_error ("Couldn't find type");
 
34
  scm_flush (scm_current_error_port ());
 
35
  scm_display (sym, scm_current_error_port ());
 
36
  scm_flush (scm_current_error_port ());
 
37
  
 
38
  assert (0);
 
39
  return 0;
 
40
}