- {
- *tail = scm_cons (scm_car (alts), SCM_EOL);
- tail = SCM_CDRLOC (*tail);
- if (i >= rep_count - alt_count)
-
- alts = scm_cdr (alts);
- }
- }
-
- return l;
-}
-
-class Volta_repeat_iterator : public Sequential_iterator
-{
-public:
- DECLARE_SCHEME_CALLBACK (constructor, ());
- Volta_repeat_iterator ();
-
- void add_repeat_command (SCM);
-protected:
- virtual SCM get_music_list () const;
- virtual void next_element (bool);
- virtual void construct_children ();
- virtual void process (Moment);
-
- bool first_time_;
- int alt_count_;
- int rep_count_;
- int done_count_;
-};
-
-
-Volta_repeat_iterator::Volta_repeat_iterator ()
-{
- done_count_ = alt_count_ = rep_count_= 0;
- first_time_ = true;
-}
-
-SCM
-Volta_repeat_iterator::get_music_list ()const
-{
- return scm_cons (get_music ()->get_property ("element"),
- get_music ()->get_property ("elements"));
-}
-
-void
-Volta_repeat_iterator::construct_children ()
-{
- Sequential_iterator::construct_children ();
-
- SCM alts = get_music ()->get_property ("elements");
-
- alt_count_ = scm_ilength (alts);
- rep_count_ = scm_to_int (get_music ()->get_property ("repeat-count"));
- done_count_ = 0;
-}
+ {
+ *tail = scm_cons (scm_car (alts), SCM_EOL);
+ tail = SCM_CDRLOC (*tail);
+ if (i >= rep_count - alt_count)