]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest-collision-engraver.cc
* lily/mark-engraver.cc (stop_translation_timestep): set grob
[lilypond.git] / lily / rest-collision-engraver.cc
index 2d718092f0d26dbabc42fc6ffcdb6b4e3bb0e4c7..2ef560aadd941dead0668453730c6cd0190403ad 100644 (file)
@@ -17,9 +17,9 @@ class Rest_collision_engraver : public Engraver
   int rest_count_;
   Link_array<Grob> note_columns_;
 protected:
-  virtual void acknowledge_grob (Grob_info);
-  virtual void process_acknowledged_grobs ();
-  virtual void stop_translation_timestep ();
+  DECLARE_ACKNOWLEDGER (note_column);
+  void process_acknowledged ();
+  void stop_translation_timestep ();
 public:
   TRANSLATOR_DECLARATIONS (Rest_collision_engraver);
 };
@@ -31,7 +31,7 @@ Rest_collision_engraver::Rest_collision_engraver ()
 }
 
 void
-Rest_collision_engraver::process_acknowledged_grobs ()
+Rest_collision_engraver::process_acknowledged ()
 {
   if (rest_collision_
       || note_columns_.is_empty ()
@@ -47,14 +47,11 @@ Rest_collision_engraver::process_acknowledged_grobs ()
 }
 
 void
-Rest_collision_engraver::acknowledge_grob (Grob_info i)
+Rest_collision_engraver::acknowledge_note_column (Grob_info i)
 {
-  if (Note_column::has_interface (i.grob ()))
-    {
-      note_columns_.push (i.grob ());
-      if (Note_column::has_rests (i.grob ()))
-       rest_count_++;
-    }
+  note_columns_.push (i.grob ());
+  if (Note_column::has_rests (i.grob ()))
+    rest_count_++;
 }
 
 void
@@ -65,10 +62,12 @@ Rest_collision_engraver::stop_translation_timestep ()
   rest_count_ = 0;
 }
 
+#include "translator.icc"
+
+ADD_ACKNOWLEDGER (Rest_collision_engraver, note_column);
 ADD_TRANSLATOR (Rest_collision_engraver,
-               /* descr */ "Handles collisions of rests.",
-               /* creats*/ "RestCollision",
-               /* accepts */ "",
-               /* acks  */ "note-column-interface",
-               /* reads */ "",
+               /* doc */ "Handles collisions of rests.",
+               /* create */ "RestCollision",
+               /* accept */ "",
+               /* read */ "",
                /* write */ "");