]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/music-iterator.hh
release: 1.1.54
[lilypond.git] / lily / include / music-iterator.hh
index 749baac14c741d2258fda04e812423b88c075ab0..9d2a68f68903b36faba3c3053dc7f8e51edfa1e9 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #define MUSIC_ITERATOR_HH
 
 #include "lily-proto.hh"
-#include "plist.hh"
 #include "array.hh"
 #include "moment.hh"
 #include "virtual-methods.hh"
+#include "interpretation-context-handle.hh"
 
 /** Walk through music and deliver music to translation units, synced
-  in time.  This classa provides both the implementation of the shared
+  in time.  This class provides both the implementation of the shared
   code, and the public interface.
 
   Derived classes should only have a public constructor.
   construct with one point in musical time.
  */
 class Music_iterator {
-  Array<Translator_group*>report_to_l_arr_;
-  void push_translator (Translator_group*);
-  void pop_translator();
+  Interpretation_context_handle handle_;
 
 protected:
   Music const * music_l_;
+
+  /// ugh. JUNKME
   bool first_b_;
 
   /**
@@ -48,7 +48,6 @@ protected:
     Get an iterator for MUS, inheriting the translation unit from THIS.
    */
   Music_iterator* get_iterator_p (Music const*mus) const;
-  void set_translator (Translator_group*);
 
   /** Do the actual reporting.  This should be overriden in derived
     classes.  It is called by #process_and_next#, the public interface 
@@ -62,17 +61,22 @@ public:
    */
   Translator_group*report_to_l() const;
 
+  void set_translator (Translator_group*);
   
   /** Get an iterator matching the type of MUS, and use TRANS to find
     an accompanying translation unit
    */
-  static Music_iterator* static_get_iterator_p (Music const* mus,Translator_group* trans);
+  static Music_iterator* static_get_iterator_p (Music const* mus);
+  void init_translator (Music const *, Translator_group *); 
 
   Music_iterator();
     
   ///  Find the next interesting point in time.
   virtual Moment next_moment() const;
 
+  ///  Return next Music item
+  virtual Music* next_music_l ();
+
   ///Are we finished with this piece of music?
   virtual bool ok() const;