2 translator.cc -- implement Translator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "translator.hh"
12 #include "translator-group.hh"
13 #include "context-def.hh"
14 #include "global-context.hh"
17 #include "ly-smobs.icc"
20 Translator::~Translator ()
27 must_be_last_ = false;
29 simple_trans_list_ = SCM_BOOL_F;
35 Translator::do_announces ()
40 Translator::process_music ()
45 Translator::Translator ()
50 Translator::Translator (Translator const &src)
53 must_be_last_ = src.must_be_last_;
57 Translator::try_music (Music *)
64 Translator::now_mom () const
66 return daddy_context_->now_mom ();
70 Translator::get_output_def () const
72 return daddy_context_->get_output_def ();
77 Translator::get_daddy_translator () const
79 return daddy_context_->implementation ();
84 Translator::internal_get_property (SCM sym) const
86 return daddy_context_->internal_get_property (sym);
90 Translator::stop_translation_timestep ()
95 this function has 2 properties
97 - It is called before try_music ()
99 - It is called before any user information enters the translators.
100 (i.e. any \property or event is not processed yet.)
104 Translator::start_translation_timestep ()
109 Translator::initialize ()
114 Translator::finalize ()
125 Translator::mark_smob (SCM sm)
127 Translator * me = (Translator*) SCM_CELL_WORD_1 (sm);
128 return me->simple_trans_list_;
132 Translator::translator_description () const
139 Translator::get_global_context () const
141 return daddy_context_ ->get_global_context ();
146 Translator::get_score_context () const
148 return daddy_context_->get_score_context ();
153 Translator::static_translator_description ()const
159 IMPLEMENT_SMOBS (Translator);
160 IMPLEMENT_DEFAULT_EQUAL_P (Translator);
161 IMPLEMENT_TYPE_P (Translator,"ly:translator?");
164 Translator::must_be_last () const
166 return must_be_last_;