2 percent-repeat-iterator.cc -- implement Percent_repeat_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #include "percent-repeat-iterator.hh"
12 #include "international.hh"
13 #include "repeated-music.hh"
15 IMPLEMENT_CTOR_CALLBACK (Percent_repeat_iterator);
17 Percent_repeat_iterator::Percent_repeat_iterator ()
23 Percent_repeat_iterator::do_quit ()
30 Percent_repeat_iterator::ok () const
36 Percent_repeat_iterator::construct_children ()
38 Music *mus = get_music ();
39 finish_mom_ = mus->get_length ();
40 child_iter_ = unsmob_iterator (get_iterator (Repeated_music::body (mus)));
44 Percent_repeat_iterator::process (Moment m)
48 Music_iterator *yeah = try_music (get_music ());
50 set_context (yeah->get_outlet ());
52 get_music ()->origin ()->warning (_ ("no one to print a percent"));
55 if (child_iter_->ok ())
56 child_iter_->process (m);
66 Percent_repeat_iterator::pending_moment ()const
68 if (child_iter_->ok ())
69 return child_iter_->pending_moment ();
75 Percent_repeat_iterator::try_music_in_children (Music *m) const
77 return child_iter_->try_music (m);
81 Percent_repeat_iterator::derived_mark ()const
84 scm_gc_mark (child_iter_->self_scm ());
88 Percent_repeat_iterator::derived_substitute (Context *f, Context *t)
91 child_iter_->substitute_outlet (f, t);