source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "translator-group.hh"
void
Request_chord_iterator::construct_children()
{
+ elt_duration_ =elt_l ()->duration ();
get_req_translator_l();
}
-Request_chord_iterator::Request_chord_iterator (Request_chord*el_l)
+Request_chord*
+Request_chord_iterator::elt_l () const
+{
+ return (Request_chord*) music_l_;
+}
+
+Request_chord_iterator::Request_chord_iterator ()
{
- elt_l_ = el_l;
- MInterval elt_dur =el_l->time_int();
- elt_duration_ = elt_dur.length ();
last_b_ = false;
}
DOUT << "duration: " << elt_duration_;
#endif
}
+
void
-Request_chord_iterator::process_and_next (Moment mom)
+Request_chord_iterator::do_process_and_next (Moment mom)
{
if (first_b_)
{
- for (PCursor<Music*> i (elt_l_->music_p_list_); i.ok(); i++)
+ for (PCursor<Music*> i (elt_l ()->music_p_list_p_->top ()); i.ok(); i++)
{
- assert (i->is_type_b (Request::static_name()));
- Request * req_l = (Request*)i.ptr();
- bool gotcha = report_to_l()->try_request (req_l);
- if (!gotcha)
- req_l->warning (_("Junking request: ") + String (req_l->name()));
-
+ if (Request * req_l = dynamic_cast<Request*> (i.ptr()))
+ {
+ bool gotcha = report_to_l()->try_request (req_l);
+ if (!gotcha)
+ req_l->warning (_f ("junking request: `%s\'", req_l->name()));
+ }
+ else
+ i.ptr ()->warning (_f ("Huh? Not a Request: `%s\'", i.ptr()->name ()));
}
first_b_ = false;
}