+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>,
+ Erik Sandberg <mandolaerik@gmail.com>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "context.hh"
+#include "input.hh"
+#include "international.hh"
+#include "music.hh"
+#include "music-wrapper-iterator.hh"
+#include "stream-event.hh"
+
+/*
+ Iterates \times, by sending TupletSpanEvents at the start/end of each
+ tuplet bracket. Extra stop/start events are sent at regular
+ intervals if tupletSpannerDuration is set.
+*/
+class Time_scaled_music_iterator : public Music_wrapper_iterator
+{
+public:
+ DECLARE_SCHEME_CALLBACK (constructor, ());
+ /* construction */
+ DECLARE_CLASSNAME (Time_scaled_music_iterator);
+ Time_scaled_music_iterator ();
+protected:
+ virtual void process (Moment m);
+ virtual void construct_children ();
+ virtual void derived_mark () const;
+ virtual Moment pending_moment () const;
+
+ Music *create_event (Direction d);
+
+private:
+
+ /* tupletSpannerDuration */
+ Moment spanner_duration_;
+
+ /* next time to add a stop/start pair */
+ Moment next_split_mom_;