]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/sequential-music-iterator.hh
d4f83c4585bd32a8125ec2b3416b3e8faaeb6d41
[lilypond.git] / lily / include / sequential-music-iterator.hh
1 /*
2   Sequential_music-iterator.hh -- declare Sequential_music_iterator
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef SEQUENTIAL_MUSIC_ITERATOR_HH
10 #define SEQUENTIAL_MUSIC_ITERATOR_HH
11
12 #include "music-iterator.hh"
13
14 /** Sequential_music iteration: walk each element in turn, and
15   construct an iterator for every element.
16   
17  */
18 class Sequential_music_iterator :  public Music_iterator
19 {
20 public:
21   VIRTUAL_COPY_CONS (Music_iterator);
22   Sequential_music_iterator ();
23   Sequential_music_iterator (Sequential_music_iterator const&);
24   virtual ~Sequential_music_iterator ();
25
26   virtual void construct_children ();
27   virtual Moment pending_moment () const;
28   virtual bool ok () const;
29   virtual void skip (Moment);
30   virtual SCM get_music (Moment)const;
31
32 protected:
33   virtual void process (Moment);
34   virtual Music_iterator *try_music_in_children (Music *) const;
35
36 private:
37   Moment here_mom_;
38
39   SCM cursor_;
40   Music_iterator * iter_p_;
41
42   void descend_to_child ();
43 };
44
45 #endif // SEQUENTIAL_MUSIC_ITERATOR_HH