]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper-iterator.cc
release: 1.0.1
[lilypond.git] / lily / music-wrapper-iterator.cc
1 /*   
2   music-wrapper-iterator.cc --  implement 
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10
11 #include "music-wrapper-iterator.hh"
12 #include "music-wrapper.hh"
13
14 Music_wrapper_iterator::Music_wrapper_iterator (Music_wrapper *r)
15 {
16   child_iter_p_ =0;
17   music_l_ = r;
18 }
19
20 IMPLEMENT_IS_TYPE_B1(Music_wrapper_iterator, Music_iterator);
21
22 void
23 Music_wrapper_iterator::do_print () const
24 {
25   child_iter_p_->print ();
26 }
27
28 void
29 Music_wrapper_iterator::construct_children ()
30 {
31   child_iter_p_ = get_iterator_p (music_l_->element_p_);  
32 }
33
34 Music_wrapper_iterator::~Music_wrapper_iterator ()
35 {
36   delete child_iter_p_;
37 }
38
39
40 bool
41 Music_wrapper_iterator::ok () const
42 {
43   return child_iter_p_->ok ();
44 }
45
46 void
47 Music_wrapper_iterator::process_and_next (Moment m)
48 {
49   child_iter_p_->process_and_next (m);
50   Music_iterator::process_and_next (m);
51 }
52
53 Moment
54 Music_wrapper_iterator::next_moment () const
55 {
56   return child_iter_p_->next_moment ();
57 }
58