]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/ligature-engraver.hh
* flower/include/axis.hh: rename from axes.hh
[lilypond.git] / lily / include / ligature-engraver.hh
index 7cd682ee072dd96d0cfdea0b6b4cf221ad592f9c..fe3bcb052d929390dd27c975bdf9206f76074a5c 100644 (file)
@@ -1,16 +1,30 @@
-/*   
+/*
   ligature-engraver.hh -- declare Ligature_engraver
-  
+
   source file of the GNU LilyPond music typesetter
-  
-  (c)  2002--2003 Juergen Reuter <reuter@ipd.uka.de>
-  
- */
+
+  (c) 2002--2005 Juergen Reuter <reuter@ipd.uka.de>
+*/
 #ifndef LIGATURE_ENGRAVER_HH
 #define LIGATURE_ENGRAVER_HH
 
 #include "engraver.hh"
 
+/*
+ * FIXME: Spanner *create_ligature_spanner () and virtual void
+ * typeset_ligature (...) are abstract methods, such that we would
+ * like to declare them abstract:
+ *
+ *    virtual Spanner *create_ligature_spanner () = 0;
+ *    virtual void typeset_ligature (...) = 0;
+ *
+ * Unfortunately, clone_const_helper() (as expanded from the
+ * TRANSLATOR_DECLARATIONS macro) requires this class to be
+ * instantiatable, such that it may not have any abstract virtual
+ * functions.  As a workaround, the actually abstract methods are
+ * implemented, but produce a programming_error whenever called. --jr
+ */
+
 class Ligature_engraver : public Engraver
 {
 protected:
@@ -18,7 +32,7 @@ protected:
   virtual void finalize ();
 
   virtual void acknowledge_grob (Grob_info);
-  virtual bool try_music (Music*);
+  virtual bool try_music (Music *);
   virtual void process_music ();
   virtual Spanner *create_ligature_spanner (); /* abstract method */
   virtual void typeset_ligature (Spanner *ligature,
@@ -27,11 +41,11 @@ protected:
   SCM brew_ligature_primitive_proc;
 
 public:
-  TRANSLATOR_DECLARATIONS(Ligature_engraver);
+  TRANSLATOR_DECLARATIONS (Ligature_engraver);
 
 private:
-  Drul_array<Music*> reqs_drul_;
-  
+  Drul_array<Music *> reqs_drul_;
+
   Spanner *ligature_;
   Array<Grob_info> primitives_;
 
@@ -45,8 +59,8 @@ private:
 
   Grob *last_bound_;
 
-  void override_molecule_callback ();
-  void revert_molecule_callback ();
+  void override_stencil_callback ();
+  void revert_stencil_callback ();
 };
 
 #endif // LIGATURE_ENGRAVER_HH