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_EOL
;
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_b (SCM sym
) const
53 Translator_def
* td
= unsmob_translator_def (definition_
);
54 bool b
= (sym
== td
->type_name_
);
56 for (SCM a
= td
->type_aliases_
; !b
&& gh_pair_p (a
); a
= ly_cdr (a
))
57 b
= b
|| sym
== ly_car (a
);
63 Translator::try_music (Music
*)
70 Translator::now_mom () const
72 return daddy_trans_
->now_mom ();
76 Translator::removal_processing ()
82 Translator::do_announces ()
87 Translator::get_output_def () const
93 Translator::internal_get_property (SCM sym
) const
95 return daddy_trans_
->internal_get_property (sym
);
99 Translator:: stop_translation_timestep ()
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 scm_gc_mark (me
->simple_trans_list_
);
129 scm_gc_mark (me
->trans_group_list_
);
130 scm_gc_mark (me
->definition_
);
131 scm_gc_mark (me
->properties_scm_
);
133 return me
->properties_scm_
;
137 Translator::translator_description () const
143 Translator::static_translator_description ()const
149 IMPLEMENT_SMOBS (Translator
);
150 IMPLEMENT_DEFAULT_EQUAL_P (Translator
);
151 IMPLEMENT_TYPE_P(Translator
,"ly:translator?");