2 translator.cc -- implement Translator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "translator.hh"
12 #include "translator-group.hh"
13 #include "translator-def.hh"
16 #include "ly-smobs.icc"
19 Translator::~Translator ()
26 simple_trans_list_ = SCM_BOOL_F;
27 trans_group_list_ = SCM_EOL;
28 properties_scm_ = SCM_EOL;
29 definition_ = SCM_EOL;
33 Translator::Translator ()
41 Translator::Translator (Translator const &s)
45 output_def_ = s.output_def_;
51 Translator::is_alias (SCM sym) const
53 return unsmob_translator_def (definition_)->is_alias (sym);
57 Translator::try_music (Music *)
64 Translator::now_mom () const
66 return daddy_trans_->now_mom ();
70 Translator::do_announces ()
75 Translator::get_output_def () const
81 Translator::internal_get_property (SCM sym) const
83 return daddy_trans_->internal_get_property (sym);
87 Translator:: stop_translation_timestep ()
92 this function has 2 properties
94 - It is called before try_music()
96 - It is called before any user information enters the translators.
97 (i.e. any \property or event is not processed yet.)
101 Translator::start_translation_timestep ()
106 Translator::initialize ()
111 Translator::finalize ()
122 Translator::mark_smob (SCM sm)
124 Translator * me = (Translator*) SCM_CELL_WORD_1 (sm);
125 scm_gc_mark (me->simple_trans_list_);
126 scm_gc_mark (me->trans_group_list_);
127 scm_gc_mark (me->definition_);
128 scm_gc_mark (me->properties_scm_);
130 return me->properties_scm_;
134 Translator::translator_description () const
140 Translator::static_translator_description ()const
146 IMPLEMENT_SMOBS (Translator);
147 IMPLEMENT_DEFAULT_EQUAL_P (Translator);
148 IMPLEMENT_TYPE_P(Translator,"ly:translator?");
151 Translator::get_simple_trans_list()