lilypond-1.3.31
[lilypond.git] / lily / music-wrapper-iterator.cc
blob69429384dc2dea2385afb37ec423a9c4915fd75d
1 /*
2 music-wrapper-iterator.cc -- implement Music_wrapper_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
11 #include "music-wrapper-iterator.hh"
12 #include "music-wrapper.hh"
14 Music_wrapper_iterator::Music_wrapper_iterator ()
16 child_iter_p_ =0;
21 void
22 Music_wrapper_iterator::do_print () const
24 child_iter_p_->print ();
27 void
28 Music_wrapper_iterator::construct_children ()
30 child_iter_p_ =
31 get_iterator_p (dynamic_cast<Music_wrapper const*> (music_l_)->element_l ());
34 Music_wrapper_iterator::~Music_wrapper_iterator ()
36 delete child_iter_p_;
40 bool
41 Music_wrapper_iterator::ok () const
43 return child_iter_p_ && child_iter_p_->ok ();
46 void
47 Music_wrapper_iterator::do_process_and_next (Moment m)
49 child_iter_p_->process_and_next (m);
50 Music_iterator::do_process_and_next (m);
54 Moment
55 Music_wrapper_iterator::next_moment () const
57 return child_iter_p_->next_moment ();
61 Music_iterator*
62 Music_wrapper_iterator::try_music_in_children (Music const *m) const
64 return child_iter_p_->try_music (m);