2 unfolded-repeat-iterator.hh -- declare Unfolded_repeat_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef UNFOLDED_REPEAT_ITERATOR_HH
11 #define UNFOLDED_REPEAT_ITERATOR_HH
13 #include "music-iterator.hh"
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 void add_repeat_command (SCM);
24 VIRTUAL_COPY_CONS (Music_iterator);
26 How often have we done the body (assuming bodies are interspersed.)?
31 are we now busy doing the body?
36 /** How far have we progressed into the repeat.
37 This excludes the elt currently being iterated.
40 int alternative_count_i_;
41 Music_iterator * current_iter_p_;
43 /// pointer to the alternative that will be processed next.
44 SCM alternative_cons_;
45 ~Unfolded_repeat_iterator();
46 Unfolded_repeat_iterator ();
49 virtual void construct_children ();
50 virtual Moment pending_moment () const;
51 virtual void process (Moment);
52 virtual Music_iterator *try_music_in_children (Music *) const;
53 virtual void skip (Moment);
54 virtual SCM get_music (Moment) const;
56 virtual bool ok () const;
57 virtual void next_element (bool side_effect);
59 #endif /* UNFOLDED_REPEAT_ITERATOR_HH */