]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-collecting-engraver.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / staff-collecting-engraver.cc
index 553e0a2d7556902299c941c7288a7a440be1d879..fe522a049747284eb8efd91dbf59442173a5e533 100644 (file)
@@ -1,47 +1,43 @@
-/*   
-staff-collecting-engraver.cc --  implement Staff_collecting_engraver
+/*
+  staff-collecting-engraver.cc -- implement Staff_collecting_engraver
 
-source file of the GNU LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
-(c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2006  Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
 
- */
 #include "staff-symbol.hh"
 #include "engraver.hh"
 #include "grob.hh"
 #include "context.hh"
 
-
 class Staff_collecting_engraver : public Engraver
 {
 public:
-  TRANSLATOR_DECLARATIONS(Staff_collecting_engraver);
-  virtual void acknowledge_grob (Grob_info);
+  TRANSLATOR_DECLARATIONS (Staff_collecting_engraver);
+  DECLARE_ACKNOWLEDGER (staff_symbol);
 };
 
 Staff_collecting_engraver::Staff_collecting_engraver ()
 {
-  
 }
 
 void
-Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
+Staff_collecting_engraver::acknowledge_staff_symbol (Grob_info gi)
 {
-  if (Staff_symbol::has_interface (gi.grob_))
-    {
-      SCM staffs = get_property ("stavesFound");
-      staffs = gh_cons (gi.grob_->self_scm (), staffs);
+  SCM staffs = get_property ("stavesFound");
+  staffs = scm_cons (gi.grob ()->self_scm (), staffs);
 
-      daddy_context_->set_property ("stavesFound", staffs);
-    }
+  context ()->set_property ("stavesFound", staffs);
 }
 
+#include "translator.icc"
+ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
 
-ENTER_DESCRIPTION(Staff_collecting_engraver,
-/* descr */       "Maintain the stavesFound variable",
+ADD_TRANSLATOR (Staff_collecting_engraver,
+               /* doc */ "Maintain the stavesFound variable",
 
-/* creats*/       "",
-/* accepts */     "",
-/* acks  */      "staff-symbol-interface",
-/* reads */       "stavesFound",
-/* write */       "stavesFound");
+               /* create */ "",
+               /* accept */ "",
+               /* read */ "stavesFound",
+               /* write */ "stavesFound");