]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie-performer.cc
* The grand 2005-2006 replace.
[lilypond.git] / lily / tie-performer.cc
index 2c0b3c4b32adbc355f6d0caab74408b06aff55eb..24bc927a1409892ba6915d2c4aa6d554b618c809 100644 (file)
@@ -3,13 +3,15 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
+#include "performer.hh"
+
+#include "music.hh"
 #include "context.hh"
 #include "audio-item.hh"
 #include "pqueue.hh"
-#include "performer.hh"
 
 class Tie_performer : public Performer
 {
@@ -21,11 +23,11 @@ class Tie_performer : public Performer
   bool ties_created_;
 
 protected:
-  virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
+  void stop_translation_timestep ();
+  void start_translation_timestep ();
   virtual void acknowledge_audio_element (Audio_element_info);
   virtual bool try_music (Music *);
-  virtual void process_music ();
+  void process_music ();
 public:
   TRANSLATOR_DECLARATIONS (Tie_performer);
 };
@@ -41,9 +43,7 @@ bool
 Tie_performer::try_music (Music *mus)
 {
   if (mus->is_mus_type ("tie-event"))
-    {
-      event_ = mus;
-    }
+    event_ = mus;
 
   return true;
 }
@@ -69,8 +69,8 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
          Music *left_mus = heads_to_tie_[i].event_;
 
          if (right_mus && left_mus
-             && ly_c_equal_p (right_mus->get_property ("pitch"),
-                              left_mus->get_property ("pitch")))
+             && ly_is_equal (right_mus->get_property ("pitch"),
+                             left_mus->get_property ("pitch")))
            {
              an->tie_to (th);
              ties_created_ = true;
@@ -84,7 +84,6 @@ Tie_performer::start_translation_timestep ()
 {
   context ()->set_property ("tieMelismaBusy",
                            ly_bool2scm (heads_to_tie_.size ()));
-
 }
 
 void
@@ -106,10 +105,11 @@ Tie_performer::stop_translation_timestep ()
   now_heads_.clear ();
 }
 
+#include "translator.icc"
+
 ADD_TRANSLATOR (Tie_performer,
-               /* descr */ "Generate ties between noteheads of equal pitch.",
-               /* creats*/ "",
-               /* accepts */ "tie-event",
-               /* acks  */ "",
-               /* reads */ "tieMelismaBusy",
+               /* doc */ "Generate ties between noteheads of equal pitch.",
+               /* create */ "",
+               /* accept */ "tie-event",
+               /* read */ "tieMelismaBusy",
                /* write */ "");