lilypond-1.1.44
[lilypond.git] / lily / include / unfolded-repeat-iterator.hh
blob1e3e19eb925c095f8f2c83747f95ab07936bd3b1
1 /*
2 unfolded-repeat-iterator.hh -- declare Unfolded_repeat_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #ifndef UNFOLDED_REPEAT_ITERATOR_HH
11 #define UNFOLDED_REPEAT_ITERATOR_HH
13 #include "music-iterator.hh"
15 /**
16 Iterate repeats. First do body, then alternatives one by one,
17 optionally interspersed by the body.
19 class Unfolded_repeat_iterator : public Music_iterator
21 public:
22 /**
23 How often have we done the body (assuming bodies are interspersed.)?
25 int done_count_;
27 /// are we busy doing the body?
28 bool do_main_b_;
30 /** How far have we progressed into the repeat.
31 This excludes the elt currently being iterated.
33 Moment done_mom_;
35 Music_iterator * current_iter_p_;
36 Cons<Music> *alternative_cons_l_;
37 ~Unfolded_repeat_iterator();
38 Unfolded_repeat_iterator ();
41 protected:
42 virtual void construct_children ();
43 virtual Moment next_moment () const;
44 virtual void do_process_and_next (Moment);
45 virtual bool ok () const;
46 virtual void next_element ();
47 virtual void do_print () const;
49 #endif /* UNFOLDED_REPEAT_ITERATOR_HH */