2 simple-music-iterator.cc -- implement Simple_music_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "simple-music-iterator.hh"
15 Simple_music_iterator::Simple_music_iterator ()
18 last_processed_mom_ = -1;
22 Simple_music_iterator::ok ()const
24 return last_processed_mom_ < music_get_length ();
28 TODO: remove last_processed_mom_, and the complete shit. We should
29 only process a simple-music once, and that is at its start.
31 Engravers can detect and event the end-moments to be processed as
36 Simple_music_iterator::pending_moment ()const
38 if (last_processed_mom_ < Moment (0))
41 return music_get_length ();
46 Simple_music_iterator::process (Moment m)
49 don't do try_music (), since it would make the function useless for
53 last_processed_mom_ = m;
56 IMPLEMENT_CTOR_CALLBACK (Simple_music_iterator);