source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "translator-group.hh"
#include "music-list.hh"
#include "request.hh"
-IMPLEMENT_IS_TYPE_B1(Request_chord_iterator,Music_iterator);
+
void
Request_chord_iterator::construct_children()
{
- elt_duration_ =elt_l ()->duration ();
+ elt_length_mom_ =elt_l ()->length_mom ();
get_req_translator_l();
}
bool
Request_chord_iterator::ok() const
{
- return (elt_duration_ && !last_b_) || first_b_;
+ return (elt_length_mom_ && !last_b_) || first_b_;
}
{
Moment m (0);
if (!first_b_)
- m = elt_duration_;
+ m = elt_length_mom_;
return m;
}
Request_chord_iterator::do_print() const
{
#ifndef NPRINT
- DOUT << "duration: " << elt_duration_;
+ DOUT << "duration: " << elt_length_mom_;
#endif
}
{
if (first_b_)
{
- for (PCursor<Music*> i (elt_l ()->music_p_list_p_->top ()); i.ok(); i++)
+ for (Cons<Music> *i = elt_l ()->music_p_list_p_->head_; i; i = i->next_)
{
- if (Request * req_l = dynamic_cast<Request*> (i.ptr()))
+ if (Request * req_l = dynamic_cast<Request*> (i->car_))
{
- bool gotcha = report_to_l()->try_request (req_l);
+ bool gotcha = report_to_l()->try_music (req_l);
if (!gotcha)
- req_l->warning (_f ("junking request: `%s\'", req_l->name()));
+ req_l->warning (_f ("junking request: `%s\'", classname( req_l)));
}
else
- i.ptr ()->warning (_f ("Huh? Not a Request: `%s\'", i.ptr()->name ()));
+ i->car_->warning (_f ("Huh? Not a Request: `%s\'",
+ classname (i->car_)));
}
first_b_ = false;
}
- if (mom >= elt_duration_)
+ if (mom >= elt_length_mom_)
last_b_ = true;
}