]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/property-iterator.cc
release: 1.1.29
[lilypond.git] / lily / property-iterator.cc
index 7fbab5fe9d9f2dacdb58b6ff8fb456ce14dd3d5c..0af9420ebffb729a435fc4369b7e25d9f09462f9 100644 (file)
@@ -3,24 +3,23 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "property-iterator.hh"
 #include "translation-property.hh"
 #include "translator-group.hh"
 
-Property_iterator::Property_iterator (Translation_property *prop_l)
-{
-  property_l_ = prop_l;
-}
-
+/**
+  There is no real processing to a property: just lookup the
+  translation unit, and set the property.
+  */
 void
-Property_iterator::process_and_next (Moment m)
+Property_iterator::do_process_and_next (Moment m)
 {
-  if (property_l_->var_str_)
-    report_to_l ()->set_property (property_l_->var_str_, property_l_->value_);
-  Music_iterator::process_and_next (m);
+  Translation_property const * prop = dynamic_cast<Translation_property const*> (music_l_);
+  if (prop->var_str_.length_i ())
+    report_to_l ()->set_property (prop->var_str_, prop->value_);
+  Music_iterator::do_process_and_next (m);
 }
 
-IMPLEMENT_IS_TYPE_B1(Property_iterator, Music_iterator);