]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/translator.cc
release: 1.3.6
[lilypond.git] / lily / translator.cc
index 3f00ff928f1b318d396269b73537e921417024ed..515a85af9bbba3ea26dabcee6468d4fd5d9474f6 100644 (file)
@@ -3,15 +3,21 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #include "translator.hh"
 #include "debug.hh"
 #include "translator-group.hh"
-#include "dictionary-iter.hh"
-#include "rational.hh"
+
+#include "moment.hh"
+
+char const*
+Translator::name() const
+{
+  return classname(this);
+}
 
 Translator::~Translator ()
 {
@@ -30,7 +36,6 @@ Translator::Translator (Translator const &s)
   status = ORPHAN;
   daddy_trans_l_ =0;
   output_def_l_ = s.output_def_l_;
-  properties_dict_ = s.properties_dict_;
   type_str_ = s.type_str_;
 }
 
@@ -41,16 +46,16 @@ Translator::is_alias_b (String s) const
 }
 
 bool
-Translator::do_try_request (Request *)
+Translator::do_try_music (Music *)
 {
   return false;
 }
                            
 
 Moment
-Translator::now_moment () const
+Translator::now_mom () const
 {
-  return daddy_trans_l_->now_moment ();
+  return daddy_trans_l_->now_mom ();
 }
 
 
@@ -73,15 +78,11 @@ void
 Translator::print () const
 {
 #ifndef NPRINT
-  DOUT << name () << " {";
-  if (name () != type_str_)
-    DOUT << "type = " << type_str_;
-  for (Dictionary_iter<Scalar> i (properties_dict_); i.ok (); i++)
-    {
-      DOUT << i.key () << "=" << i.val () << '\n';
-    }
+  DEBUG_OUT << classname (this) << " {";
+  if (classname (this) != type_str_)
+    DEBUG_OUT << "type = " << type_str_;
   do_print ();
-  DOUT << "}\n";
+  DEBUG_OUT << "}\n";
 #endif
 }
 
@@ -90,7 +91,7 @@ Translator::do_print () const
 {
 }
 
-IMPLEMENT_IS_TYPE_B(Translator);
+
 
 
 void
@@ -127,12 +128,12 @@ Translator::removal_processing ()
 
 
 bool
-Translator::try_request (Request * r)
+Translator::try_music (Music * r)
 {
   if (status < MOVE_INITED)
     post_move_processing ();
 
-  return do_try_request (r);
+  return do_try_music (r);
 }
 
 void
@@ -154,29 +155,36 @@ Translator::pre_move_processing ()
   status = CREATION_INITED;
 }
 
-Scalar
-Translator::get_property (String id)
-{
-  if (properties_dict_.elt_b (id))
-    {
-      return properties_dict_[id];
-    }
-  
-  if (daddy_trans_l_)
-    return daddy_trans_l_->get_property (id);
 
-  return "";
-}
 
-void
-Translator::set_property (String id, Scalar val)
+Music_output_def *
+Translator::output_def_l () const
 {
-  properties_dict_[id] = val;
+  return output_def_l_;
 }
 
+SCM
+Translator::get_property (String id, Translator_group **where_l) const
+{
+  return daddy_trans_l_->get_property (ly_symbol2scm (id.ch_C()), where_l);
+}
 
-Music_output_def *
-Translator::output_def_l () const
+SCM
+Translator::get_property (SCM sym,
+                         Translator_group **where_l) const
 {
-  return output_def_l_;
+  return daddy_trans_l_->get_property (sym, where_l);
 }
+
+
+
+void
+Translator:: do_pre_move_processing(){}
+void
+Translator::do_post_move_processing(){}
+void
+Translator::do_process_requests () {}
+void
+Translator::do_creation_processing() {}
+void
+Translator::do_removal_processing(){}