]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/folded-repeat-iterator.hh
Merge with master
[lilypond.git] / lily / include / folded-repeat-iterator.hh
index d9215a95553b3c71e8901d78a807981b49b95720..d32f77d57f90575889c3092280102c994c219575 100644 (file)
@@ -1,11 +1,10 @@
-/*   
+/*
   folded-repeat-iterator.hh -- declare Folded_repeat_iterator
-  
+
   source file of the GNU LilyPond music typesetter
-  
-  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
+
+  (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
 
 #ifndef FOLDED_REPEAT_ITERATOR_HH
 #define FOLDED_REPEAT_ITERATOR_HH
 /**
    Iterate through a repeated section: first do the body, then
    all alternatives in parallel.
- */
+*/
 class Folded_repeat_iterator : public Music_iterator
 {
-  Music_iterator * main_iter_p_;
-  Music_iterator * alternative_iter_p_;
-  int count_;
-  Moment main_length_mom_;
 public:
+  DECLARE_SCHEME_CALLBACK (constructor, ());
+  DECLARE_CLASSNAME(Folded_repeat_iterator);
+
+  Folded_repeat_iterator (Folded_repeat_iterator const &src);
   Folded_repeat_iterator ();
-  ~Folded_repeat_iterator ();
-  
+  virtual void derived_mark () const;
+  virtual void derived_substitute (Context *f, Context *t);
+
   virtual void construct_children ();
-  virtual Moment next_moment () const;
+  virtual Moment pending_moment () const;
+  virtual void do_quit ();
   virtual bool ok () const;
 
 protected:
   void enter_alternative ();
   void leave_body ();
-  
-  virtual void do_print () const;
-  virtual void do_process_and_next (Moment);
+
+  virtual void process (Moment);
+
+private:
+  Music_iterator *main_iter_;
+  Music_iterator *alternative_iter_;
+
+  Moment main_length_mom_;
 };
 #endif /* FOLDED_REPEAT_ITERATOR_HH */