X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-heads-engraver.cc;h=7c82106623933eecfe502f34006149dc012b6661;hb=13498a20fb3678da0042ffa6ae3427ca22b22a79;hp=9c12fc78b26a53a208454254141ba4218c1093f7;hpb=59a6d1a06432fc0ca88c3023c646182f389ec1b5;p=lilypond.git diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 9c12fc78b2..7c82106623 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -20,6 +20,7 @@ #include "engraver.hh" #include +using namespace std; #include "duration.hh" #include "item.hh" @@ -32,8 +33,6 @@ #include "translator.icc" -using std::vector; - class Note_heads_engraver : public Engraver { vector note_evs_; @@ -42,16 +41,16 @@ public: TRANSLATOR_DECLARATIONS (Note_heads_engraver); protected: - DECLARE_TRANSLATOR_LISTENER (note); + void listen_note (Stream_event *); void process_music (); void stop_translation_timestep (); }; -Note_heads_engraver::Note_heads_engraver () +Note_heads_engraver::Note_heads_engraver (Context *c) + : Engraver (c) { } -IMPLEMENT_TRANSLATOR_LISTENER (Note_heads_engraver, note); void Note_heads_engraver::listen_note (Stream_event *ev) { @@ -122,6 +121,12 @@ Note_heads_engraver::stop_translation_timestep () note_evs_.clear (); } +void +Note_heads_engraver::boot () +{ + ADD_LISTENER (Note_heads_engraver, note); +} + ADD_TRANSLATOR (Note_heads_engraver, /* doc */ "Generate note heads.",