2 request-iterator.cc -- implement Request_chord_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "translator-group.hh"
11 #include "request-iterator.hh"
12 #include "music-list.hh"
18 Request_chord_iterator::construct_children()
20 elt_length_mom_ =elt_l ()->length_mom ();
21 get_req_translator_l();
25 Request_chord_iterator::elt_l () const
27 return (Request_chord*) music_l_;
30 Request_chord_iterator::Request_chord_iterator ()
33 // cursor_ = elt_l ()->music_p_list_p_->head_;
39 Request_chord_iterator::ok() const
41 return (elt_length_mom_ && !last_b_) || first_b_;
45 Request_chord_iterator::next_moment() const
54 Request_chord_iterator::next_music_l ()
58 cursor_ = elt_l ()->music_p_list_p_->head_;
64 cursor_ = cursor_->next_;
73 Request_chord_iterator::do_print() const
76 DOUT << "duration: " << elt_length_mom_;
81 Request_chord_iterator::do_process_and_next (Moment mom)
85 for (Cons<Music> *i = elt_l ()->music_p_list_p_->head_; i; i = i->next_)
87 if (Request * req_l = dynamic_cast<Request*> (i->car_))
89 bool gotcha = report_to_l()->try_music (req_l);
91 req_l->warning (_f ("junking request: `%s\'", classname( req_l)));
94 i->car_->warning (_f ("Huh? Not a Request: `%s\'",
95 classname (i->car_)));
100 if (mom >= elt_length_mom_)