2 request-chord-iterator.cc -- implement Request_chord_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "translator-group.hh"
11 #include "request-chord-iterator.hh"
12 #include "music-list.hh"
15 Request_chord_iterator::Request_chord_iterator ()
20 Request_chord_iterator::Request_chord_iterator (Request_chord_iterator const &src)
21 : Music_iterator (src)
23 last_b_ = src.last_b_;
24 elt_length_mom_ = src.elt_length_mom_;
28 Request_chord_iterator::construct_children()
30 elt_length_mom_ =elt_l ()->length_mom ();
31 get_req_translator_l();
35 Request_chord_iterator::elt_l () const
37 return (Request_chord*) music_l_;
41 Request_chord_iterator::ok() const
43 return (elt_length_mom_ && !last_b_) || first_b_;
47 Request_chord_iterator::next_moment() const
57 Request_chord_iterator::do_print() const
60 DEBUG_OUT << "duration: " << elt_length_mom_;
65 Request_chord_iterator::next ()
75 Request_chord_iterator::do_process_and_next (Moment)
80 for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list (); gh_pair_p (s); s = gh_cdr (s))
82 Music *mus = unsmob_music (gh_car (s));
83 if (Request * req_l = dynamic_cast<Request*> (mus))
85 bool gotcha = try_music (req_l);
87 req_l->origin ()->warning (_f ("Junking request: `%s'", classname( req_l)));
90 mus->origin ()->warning (_f ("Huh? Not a Request: `%s'",