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"
11 #include "repeated-music.hh"
14 IMPLEMENT_CTOR_CALLBACK (Percent_repeat_iterator);
16 Percent_repeat_iterator::Percent_repeat_iterator ()
22 Percent_repeat_iterator::do_quit ()
29 Percent_repeat_iterator::ok () const
35 Percent_repeat_iterator::construct_children ()
37 Music *mus = get_music ();
38 finish_mom_ = mus->get_length ();
39 child_iter_ = unsmob_iterator (get_iterator (Repeated_music::body (mus)));
43 Percent_repeat_iterator::process (Moment m)
47 Music_iterator *yeah = try_music (get_music ());
49 set_context (yeah->get_outlet ());
51 get_music ()->origin ()->warning (_ ("no one to print a percent"));
54 if (child_iter_->ok ())
55 child_iter_->process (m);
65 Percent_repeat_iterator::pending_moment ()const
67 if (child_iter_->ok ())
68 return child_iter_->pending_moment ();
74 Percent_repeat_iterator::try_music_in_children (Music *m) const
76 return child_iter_->try_music (m);
80 Percent_repeat_iterator::derived_mark ()const
83 scm_gc_mark (child_iter_->self_scm ());
87 Percent_repeat_iterator::derived_substitute (Context *f, Context *t)
90 child_iter_->substitute_outlet (f, t);