* scm/beam.scm (check-slope-callbacks): check sign of slope.
[lilypond.git] / lily / event-chord-iterator.cc
blobe588574020e06e93b310ebc702f2aa92f5d91ce0
1 /*
2 event-chord-iterator.cc -- implement Event_chord_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "context.hh"
10 #include "warn.hh"
11 #include "event-chord-iterator.hh"
12 #include "music-list.hh"
13 #include "event.hh"
15 Event_chord_iterator::Event_chord_iterator ()
19 Context *
20 Event_chord_iterator::get_req_translator ()
22 assert (get_outlet ());
23 if (get_outlet ()->is_bottom_context ())
24 return get_outlet ();
26 set_translator (get_outlet ()->get_default_interpreter ());
27 return get_outlet ();
30 void
31 Event_chord_iterator::construct_children ()
33 Simple_music_iterator::construct_children ();
34 get_req_translator ();
37 Event_chord*
38 Event_chord_iterator::get_elt () const
40 return (Event_chord*) get_music ();
44 void
45 Event_chord_iterator::process (Moment m)
47 if (last_processed_mom_ < Moment (0))
49 for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list ();
50 ly_c_pair_p (s); s = ly_cdr (s))
52 Music *mus = unsmob_music (ly_car (s));
54 bool gotcha = try_music (mus);
55 if (!gotcha)
56 mus->origin ()->warning (_f ("Junking event: `%s'", mus->name ()));
59 Simple_music_iterator::process (m);
62 IMPLEMENT_CTOR_CALLBACK (Event_chord_iterator);