2 simple-music-iterator.cc -- implement Simple_music_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "simple-music-iterator.hh"
14 Simple_music_iterator::Simple_music_iterator ()
17 last_processed_mom_ = -1;
20 Simple_music_iterator::Simple_music_iterator (Simple_music_iterator const &src)
21 : Music_iterator (src)
23 last_processed_mom_ = src.last_processed_mom_;
27 Simple_music_iterator::ok ()const
29 return last_processed_mom_ < music_length_mom ();
33 TODO: remove last_processed_mom_, and the complete shit. We should
34 only process a simple-music once, and that is at its start.
36 Engravers can detect and request the end-moments to be processed as
41 Simple_music_iterator::pending_moment ()const
43 if (last_processed_mom_ < Moment (0))
46 return music_length_mom ();
50 Simple_music_iterator::skip (Moment m)
55 uncommented because setting MUSIC_L_ = 0 causes core dumps with
60 last_processed_mom_ = m;
64 Simple_music_iterator::process (Moment m)
67 don't do try_music (), since it would make the function useless for
73 IMPLEMENT_CTOR_CALLBACK (Simple_music_iterator);