2 translator.cc -- implement Translator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "translator.hh"
12 #include "translator-group.hh"
13 #include "context-def.hh"
14 #include "global-context.hh"
16 #include "translator.icc"
17 #include "ly-smobs.icc"
19 Translator::~Translator ()
26 must_be_last_ = false;
34 Translator::process_music ()
39 Translator::process_acknowledged ()
43 Translator::Translator ()
48 Translator::Translator (Translator const &src)
51 must_be_last_ = src.must_be_last_;
55 Translator::try_music (Music *)
61 Translator::now_mom () const
63 return daddy_context_->now_mom ();
67 Translator::get_output_def () const
69 return daddy_context_->get_output_def ();
73 Translator::get_daddy_translator () const
75 return daddy_context_->implementation ();
79 Translator::internal_get_property (SCM sym) const
81 return daddy_context_->internal_get_property (sym);
85 Translator::stop_translation_timestep ()
90 this function has 2 properties
92 - It is called before try_music ()
94 - It is called before any user information enters the translators.
95 (i.e. any \property or event is not processed yet.)
98 Translator::start_translation_timestep ()
103 Translator::initialize ()
108 Translator::finalize ()
116 Translator::mark_smob (SCM sm)
118 Translator *me = (Translator *) SCM_CELL_WORD_1 (sm);
124 Translator::translator_description () const
130 Translator::get_global_context () const
132 return daddy_context_->get_global_context ();
136 Translator::get_score_context () const
138 return daddy_context_->get_score_context ();
142 Translator::static_translator_description ()const
147 IMPLEMENT_SMOBS (Translator);
148 IMPLEMENT_DEFAULT_EQUAL_P (Translator);
149 IMPLEMENT_TYPE_P (Translator, "ly:translator?");
152 Translator::must_be_last () const
154 return must_be_last_;
158 Translator::derived_mark () const
163 Translator::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])
165 for (int i = 0; i < TRANSLATOR_METHOD_PRECOMPUTE_COUNT; i++)
170 Translator::print_smob (SCM s, SCM port, scm_print_state *)
172 Translator *me = (Translator *) SCM_CELL_WORD_1 (s);
173 scm_puts ("#<Translator ", port);
174 scm_puts (classname (me), port);
175 scm_puts (" >", port);