2 property-iterator.cc -- implement Property_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "property-iterator.hh"
11 #include "translator-def.hh"
12 #include "translator-group.hh"
15 There is no real processing to a property: just lookup the
16 translation unit, and set the property.
19 Property_iterator::process (Moment m)
21 SCM sym = music_l_->get_mus_property ("symbol");
24 SCM val = music_l_->get_mus_property ("value");
27 ok = type_check_assignment (val, sym, ly_symbol2scm ("translation-type?"));
29 report_to_l ()->set_property (sym, val);
31 Simple_music_iterator::process (m);
35 Push_property_iterator::process (Moment m)
37 SCM syms = music_l_->get_mus_property ("symbols");
38 SCM eprop = music_l_->get_mus_property ("grob-property");
39 SCM val = music_l_->get_mus_property ("grob-value");
41 if (to_boolean (music_l_->get_mus_property ( "pop-first")))
42 Translator_def::apply_pushpop_property (report_to_l (),
43 syms, eprop, SCM_UNDEFINED);
45 Translator_def::apply_pushpop_property (report_to_l (), syms, eprop, val);
47 Simple_music_iterator::process (m);
51 Pop_property_iterator::process (Moment m)
53 SCM syms = music_l_->get_mus_property ("symbols");
54 SCM eprop = music_l_->get_mus_property ("grob-property");
55 Translator_def::apply_pushpop_property (report_to_l (), syms, eprop, SCM_UNDEFINED);
57 Simple_music_iterator::process (m);
60 IMPLEMENT_CTOR_CALLBACK(Pop_property_iterator);
61 IMPLEMENT_CTOR_CALLBACK(Push_property_iterator);
62 IMPLEMENT_CTOR_CALLBACK(Property_iterator);