]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/translator-group.cc
* Documentation/user/refman.itely: Compile fix for \mark #'(music ...).
[lilypond.git] / lily / translator-group.cc
index aee0c2309c1638d24e35ab2b2e6e6ec8858d5ac0..f37563c6c28df98722a6207d626474d65d0237bf 100644 (file)
@@ -9,7 +9,7 @@
 #include "music-output-def.hh"
 #include "translator-group.hh"
 #include "translator.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "moment.hh"
 #include "scm-hash.hh"
 #include "translator-def.hh"
@@ -312,16 +312,6 @@ Translator_group::internal_set_property (SCM sym, SCM val)
   properties_dict ()->set (sym, val);
 }
 
-void
-Translator_group::internal_set_children_property (SCM sym, SCM val)
-{
-  internal_set_property (sym, val);
-  for (SCM p = trans_group_list_; gh_pair_p (p); p = ly_cdr(p)) {
-    Translator_group *trg =  dynamic_cast<Translator_group*> (unsmob_translator (ly_car (p)));
-    trg->internal_set_children_property(sym,ly_deep_copy(val));
-  }
-}
-
 /*
   TODO: look up to check whether we have inherited var? 
  */
@@ -403,7 +393,7 @@ Translator_group::start_translation_timestep ()
 void
 Translator_group::do_announces ()
 {
-  each (&Translator::announces);
+  each (&Translator::do_announces);
 }
 
 void
@@ -418,9 +408,10 @@ Translator_group::finalize ()
   each (&Translator::removal_processing);
 }
 
-
-SCM
-ly_get_trans_property (SCM context, SCM name)
+LY_DEFINE(ly_get_context_property,
+         "ly-get-context-property", 2, 0, 0,
+         (SCM context, SCM name),
+         "retrieve the value of @var{sym} from context @var{tr}")
 {
   Translator *t = unsmob_translator (context);
   Translator_group* tr=   dynamic_cast<Translator_group*> (t);
@@ -430,27 +421,18 @@ ly_get_trans_property (SCM context, SCM name)
   return tr->internal_get_property (name);
   
 }
-SCM
-ly_set_trans_property (SCM context, SCM name, SCM val)
+
+LY_DEFINE(ly_set_context_property,
+         "ly-set-context-property", 3, 0, 0,
+         (SCM context, SCM name, SCM val),
+         "set value of property @var{sym} in context @var{tr} to @var{val}.
+")
 {
   Translator *t = unsmob_translator (context);
   Translator_group* tr=   dynamic_cast<Translator_group*> (t);
 
-  SCM_ASSERT_TYPE(tr, context, SCM_ARG1, __FUNCTION__, "Translator group");
+  SCM_ASSERT_TYPE(tr, context, SCM_ARG1, __FUNCTION__, "Context");
   tr->internal_set_property (name, val);
 
   return SCM_UNSPECIFIED;
 }
-
-
-
-
-void
-add_trans_scm_funcs ()
-{
-  scm_c_define_gsubr ("ly-get-trans-property", 2, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
-  scm_c_define_gsubr ("ly-set-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_set_trans_property);
-}
-
-ADD_SCM_INIT_FUNC (trans_scm, add_trans_scm_funcs);
-