]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper-iterator.cc
release: 1.0.15
[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 IMPLEMENT_IS_TYPE_B1(Music_wrapper_iterator, Music_iterator);
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 ()
40 {
41   return (Music_wrapper*) music_l_;
42 }
43 bool
44 Music_wrapper_iterator::ok () const
45 {
46   return child_iter_p_->ok ();
47 }
48
49 void
50 Music_wrapper_iterator::do_process_and_next (Moment m)
51 {
52   child_iter_p_->process_and_next (m);
53   Music_iterator::do_process_and_next (m);
54 }
55
56 Moment
57 Music_wrapper_iterator::next_moment () const
58 {
59   return child_iter_p_->next_moment ();
60 }
61