]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper-iterator.cc
e282bded8c60b7c1c43635810cfff418e9ee2b31
[lilypond.git] / lily / music-wrapper-iterator.cc
1 /*   
2   music-wrapper-iterator.cc --  implement Music_wrapper_iterator
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 ()
15 {
16   child_iter_p_ =0;
17 }
18
19
20
21 void
22 Music_wrapper_iterator::do_print () const
23 {
24   child_iter_p_->print ();
25 }
26
27 void
28 Music_wrapper_iterator::construct_children ()
29 {
30   child_iter_p_ = get_iterator_p (music_wrapper_l ()->element_p_);  
31 }
32
33 Music_wrapper_iterator::~Music_wrapper_iterator ()
34 {
35   delete child_iter_p_;
36 }
37
38 Music_wrapper*
39 Music_wrapper_iterator::music_wrapper_l () const
40 {
41   return (Music_wrapper*) music_l_;
42 }
43
44 bool
45 Music_wrapper_iterator::ok () const
46 {
47   return child_iter_p_->ok ();
48 }
49
50 void
51 Music_wrapper_iterator::do_process_and_next (Moment m)
52 {
53   child_iter_p_->process_and_next (m);
54   Music_iterator::do_process_and_next (m);
55 }
56
57 Moment
58 Music_wrapper_iterator::next_moment () const
59 {
60   return child_iter_p_->next_moment ();
61 }
62