]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/ottava-engraver.cc
Web-ja: update introduction
[lilypond.git] / lily / ottava-engraver.cc
index 67eb00ba11f2c9397770618b3d1de9aee3ab7771..e9bcbe94d5ffdb3f53bd5b9da14a749e7f067dbb 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2000--2014 Han-Wen Nienhuys
+  Copyright (C) 2000--2015 Han-Wen Nienhuys
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ public:
 protected:
   virtual void finalize ();
 
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_note_column (Grob_info);
 
   void process_music ();
   void stop_translation_timestep ();
@@ -52,7 +52,8 @@ Ottava_spanner_engraver::derived_mark () const
   scm_gc_mark (last_ottavation_);
 }
 
-Ottava_spanner_engraver::Ottava_spanner_engraver ()
+Ottava_spanner_engraver::Ottava_spanner_engraver (Context *c)
+  : Engraver (c)
 {
   finished_ = 0;
   span_ = 0;
@@ -63,7 +64,7 @@ void
 Ottava_spanner_engraver::process_music ()
 {
   SCM ott = get_property ("ottavation");
-  if (ott != last_ottavation_)
+  if (!scm_is_eq (ott, last_ottavation_))
     {
       finished_ = span_;
       span_ = 0;
@@ -103,7 +104,7 @@ Ottava_spanner_engraver::typeset_all ()
         {
           if (!finished_->get_bound (RIGHT))
             {
-              Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
+              Grob *e = unsmob<Grob> (get_property ("currentMusicalColumn"));
               finished_->set_bound (d, e);
             }
         }
@@ -117,7 +118,7 @@ Ottava_spanner_engraver::stop_translation_timestep ()
 {
   if (span_ && !span_->get_bound (LEFT))
     {
-      Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
+      Grob *e = unsmob<Grob> (get_property ("currentMusicalColumn"));
       span_->set_bound (LEFT, e);
     }
 
@@ -136,7 +137,12 @@ Ottava_spanner_engraver::finalize ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Ottava_spanner_engraver, note_column);
+
+void
+Ottava_spanner_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Ottava_spanner_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Ottava_spanner_engraver,
                 /* doc */