2 translator.cc -- implement Translator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "translator.hh"
12 #include "translator-group.hh"
14 #include "rational.hh"
16 Translator::~Translator ()
20 Translator::Translator ()
27 Translator::Translator (Translator const &s)
32 output_def_l_ = s.output_def_l_;
33 type_str_ = s.type_str_;
37 Translator::is_alias_b (String s) const
39 return s == type_str_;
43 Translator::do_try_music (Music *)
50 Translator::now_moment () const
52 return daddy_trans_l_->now_moment ();
57 Translator::add_processing ()
67 Translator::do_add_processing ()
72 Translator::print () const
75 DOUT << classname (this) << " {";
76 if (classname (this) != type_str_)
77 DOUT << "type = " << type_str_;
84 Translator::do_print () const
92 Translator::creation_processing ()
94 if (status >= CREATION_INITED)
97 do_creation_processing ();
98 status = CREATION_INITED;
102 Translator::post_move_processing ()
104 if (status >= MOVE_INITED)
107 creation_processing ();
108 do_post_move_processing ();
109 status = MOVE_INITED;
113 Translator::removal_processing ()
115 if (status == ORPHAN)
117 creation_processing ();
118 do_removal_processing ();
125 Translator::try_music (Music * r)
127 if (status < MOVE_INITED)
128 post_move_processing ();
130 return do_try_music (r);
134 Translator::process_requests ()
136 if (status < PROCESSED_REQS)
137 post_move_processing ();
138 else if (status >= PROCESSED_REQS)
141 status = PROCESSED_REQS;
142 do_process_requests ();
146 Translator::pre_move_processing ()
148 do_pre_move_processing ();
149 status = CREATION_INITED;
155 Translator::output_def_l () const
157 return output_def_l_;
161 Translator::get_property (String id, Translator_group **where_l) const
163 return daddy_trans_l_->get_property (id, where_l);