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"
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;
31 accepts_list_ = SCM_EOL;
34 Translator::Translator ()
42 Translator::Translator (Translator const &s)
46 output_def_ = s.output_def_;
52 Translator::is_alias (SCM sym) const
54 return unsmob_context_def (definition_)->is_alias (sym);
58 Translator::try_music (Music *)
65 Translator::now_mom () const
67 return daddy_trans_->now_mom ();
71 Translator::do_announces ()
76 Translator::get_output_def () const
80 ? daddy_trans_->get_output_def ()
85 Translator::internal_get_property (SCM sym) const
87 return daddy_trans_->internal_get_property (sym);
91 Translator::stop_translation_timestep ()
96 this function has 2 properties
98 - It is called before try_music()
100 - It is called before any user information enters the translators.
101 (i.e. any \property or event is not processed yet.)
105 Translator::start_translation_timestep ()
110 Translator::initialize ()
115 Translator::finalize ()
126 Translator::mark_smob (SCM sm)
128 Translator * me = (Translator*) SCM_CELL_WORD_1 (sm);
129 scm_gc_mark (me->simple_trans_list_);
130 scm_gc_mark (me->trans_group_list_);
131 scm_gc_mark (me->definition_);
132 scm_gc_mark (me->properties_scm_);
133 scm_gc_mark (me->accepts_list_);
135 return me->properties_scm_;
139 Translator::translator_description () const
145 Translator::static_translator_description ()const
151 IMPLEMENT_SMOBS (Translator);
152 IMPLEMENT_DEFAULT_EQUAL_P (Translator);
153 IMPLEMENT_TYPE_P(Translator,"ly:translator?");
156 Translator::get_simple_trans_list()