-
-bool
-Unfolded_repeat_iterator::ok () const
-{
- return current_iter_p_ ;
-}
-
-Moment
-Unfolded_repeat_iterator::next_moment () const
-{
- return done_mom_ + current_iter_p_->next_moment ();
-}
-
-void
-Unfolded_repeat_iterator::construct_children ()
-{
- Repeated_music const* mus =dynamic_cast<Repeated_music const*> (music_l_);
- alternative_cons_l_ = (mus->alternatives_p_)
- ? mus->alternatives_p_->music_p_list_p_->head_
- : 0;
-
- for (Cons<Music> *p = alternative_cons_l_; p; p = p->next_)
- alternative_count_i_ ++;
-
- if (mus->repeat_body_p_)
- {
- current_iter_p_ = get_iterator_p (mus->repeat_body_p_);
- do_main_b_ = true;
- }
- else if (alternative_cons_l_)
- {
- current_iter_p_ = get_iterator_p (alternative_cons_l_->car_);
- do_main_b_ = false;
- }
-}
-
-void
-Unfolded_repeat_iterator::do_process_and_next (Moment m)
-{
- if (!m)
- {
- Music_iterator *yeah = try_music (music_l_);
- if (yeah)
- set_translator (yeah->report_to_l ());
- else
- music_l_->warning ( _("no one to print a volta bracket"));
- }
- while (1)
- {
- while (!current_iter_p_->ok ())
- {
- next_element();
-
- if (!current_iter_p_)
- return;