]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/sequential-music-iterator.hh
* The grand 2005-2006 replace.
[lilypond.git] / lily / include / sequential-music-iterator.hh
index 37cfbe34be57dccdac82a5284f7b74a5cf7e4f39..a70d7bcd4009ddec3d41ca165e7b49f6a44a06be 100644 (file)
@@ -3,79 +3,24 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #ifndef SEQUENTIAL_MUSIC_ITERATOR_HH
 #define SEQUENTIAL_MUSIC_ITERATOR_HH
 
-#include "music-iterator.hh"
-
-
-/*
-
-  This is a lookahead list for grace notes.
-
-   {  ... X \grace Y  Z ... }
-
-   normally, the ending of X is the start of Z. In case of a grace
-   note, we take off a little at the end of X. What is stored: START
-   (start point of X), LENGTH (length of X), GRACE_START (start_music
-   of Y), and the next fixup element.
-
-  This is also done for nested musics, i.e.
-
-  voiceA = \notes { \grace b16 c'2 }
-  voiceB = \notes { c'2 \voiceA }
-
-  the iterator for voiceB will contain a fixup entry with (START=0/1,
-  LENGTH=2/1, GRACE_START=(0G-1/16) ) 
-   
-  Graces at the start of a sequential music iterator are handled
-  by initting here_mom_ with Music::start_music (); no fixups are needed.
-
-*/
-struct Grace_fixup 
-{
-  Moment start_;
-  Moment length_;
-
-  Rational grace_start_;  
-  Grace_fixup *next_;
-};
+#include "sequential-iterator.hh"
 
 /** Sequential_music iteration: walk each element in turn, and
-  construct an iterator for every element.
-  
- */
-class Sequential_music_iterator :  public Music_iterator
+    construct an iterator for every element.
+*/
+class Sequential_music_iterator : public Sequential_iterator
 {
 public:
-  Grace_fixup * grace_fixups_;
-  
-  VIRTUAL_COPY_CONS (Music_iterator);
-  static SCM constructor_cxx_function;
-  Sequential_music_iterator ();
-  Sequential_music_iterator (Sequential_music_iterator const&);
-  virtual ~Sequential_music_iterator ();
-
-  virtual void construct_children ();
-  virtual Moment pending_moment () const;
-  virtual bool ok () const;
-  virtual void skip (Moment);
-  virtual SCM get_music (Moment)const;
-
-protected:
-  virtual void process (Moment);
-  virtual Music_iterator *try_music_in_children (Music *) const;
-
+  DECLARE_SCHEME_CALLBACK (constructor, ());
+  DECLARE_CLASSNAME(Sequential_music_iterator);
 private:
-  Moment here_mom_;
-  SCM cursor_;
-  Music_iterator * iter_p_;
-
-  void next_element ();
-  void descend_to_child ();
+  virtual SCM get_music_list ()const;
 };
 
 #endif // SEQUENTIAL_MUSIC_ITERATOR_HH