2 request-iterator.cc -- implement Request_chord_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "translator-group.hh"
11 #include "request-iterator.hh"
12 #include "music-list.hh"
15 IMPLEMENT_IS_TYPE_B1(Request_chord_iterator,Music_iterator);
18 Request_chord_iterator::construct_children()
20 get_req_translator_l();
23 Request_chord_iterator::Request_chord_iterator (Request_chord*el_l)
26 MInterval elt_dur =el_l->time_int();
27 elt_duration_ = elt_dur.length ();
33 Request_chord_iterator::ok() const
35 return (elt_duration_ && !last_b_) || first_b_;
41 Request_chord_iterator::next_moment() const
50 Request_chord_iterator::do_print() const
53 DOUT << "duration: " << elt_duration_;
57 Request_chord_iterator::process_and_next (Moment mom)
61 for (PCursor<Music*> i (elt_l_->music_p_list_); i.ok(); i++)
63 assert (i->is_type_b (Request::static_name()));
64 Request * req_l = (Request*)i.ptr();
65 bool gotcha = report_to_l()->try_request (req_l);
67 req_l->warning (_("Junking request: ") + String (req_l->name()));
73 if (mom >= elt_duration_)