-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)
- {
- bool success = report_to_l ()->try_music (music_l_);
- if (!success)
- music_l_->warning ( _("No one to print a volta bracket"));
- }
- while (1)
- {
- while (!current_iter_p_->ok ())
- {
- next_element();
-
- if (!current_iter_p_)
- return;
- }
-
- if (m - done_mom_ >= current_iter_p_->next_moment ())
- current_iter_p_->process_and_next (m - done_mom_);
- else
- return;
- }
-}
-
-void
-Unfolded_repeat_iterator::do_print () const
-{
-#ifndef NPRINT
- DOUT << "count " << done_count_ << "done time " << done_mom_ << '\n';
- DOUT << "current: ";
- current_iter_p_->print();
-#endif
-}