X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fligature-engraver.hh;h=6f53331a4e5493627debd1ebea1bc48952f28726;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=413f1fe8333bcba346e4e0cee9cb30ce0cdf5699;hpb=e24df7c27635dc996c466295eacf2981bddccaf7;p=lilypond.git diff --git a/lily/include/ligature-engraver.hh b/lily/include/ligature-engraver.hh index 413f1fe833..6f53331a4e 100644 --- a/lily/include/ligature-engraver.hh +++ b/lily/include/ligature-engraver.hh @@ -1,67 +1,64 @@ -/* - ligature-engraver.hh -- declare Ligature_engraver - - source file of the GNU LilyPond music typesetter - - (c) 2002--2005 Juergen Reuter - - */ +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 2002--2015 Juergen Reuter + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ + #ifndef LIGATURE_ENGRAVER_HH #define LIGATURE_ENGRAVER_HH #include "engraver.hh" - -/* - * FIXME: Spanner *create_ligature_spanner () and virtual void - * typeset_ligature (...) are abstract methods, such that we would - * like to declare them abstract: - * - * virtual Spanner *create_ligature_spanner () = 0; - * virtual void typeset_ligature (...) = 0; - * - * Unfortunately, clone_const_helper() (as expanded from the - * TRANSLATOR_DECLARATIONS macro) requires this class to be - * instantiatable, such that it may not have any abstract virtual - * functions. As a workaround, the actually abstract methods are - * implemented, but produce a programming_error whenever called. --jr - */ +#include "moment.hh" class Ligature_engraver : public Engraver { protected: - virtual void stop_translation_timestep (); + Ligature_engraver (); + void stop_translation_timestep (); virtual void finalize (); - virtual void acknowledge_grob (Grob_info); - virtual bool try_music (Music*); - virtual void process_music (); - virtual Spanner *create_ligature_spanner (); /* abstract method */ + DECLARE_ACKNOWLEDGER (rest); + DECLARE_ACKNOWLEDGER (ligature_head); + virtual void listen_ligature (Stream_event *ev); + void process_music (); + virtual Spanner *create_ligature_spanner () = 0; virtual void typeset_ligature (Spanner *ligature, - Array primitives); /* abstract method */ + vector const &primitives) = 0; virtual Spanner *current_ligature (); SCM brew_ligature_primitive_proc; public: - TRANSLATOR_DECLARATIONS(Ligature_engraver); + // no TRANSLATOR_DECLARATIONS (Ligature_engraver) needed since this + // class is abstract private: - Drul_array reqs_drul_; - + Drul_array events_drul_; + Spanner *ligature_; - Array primitives_; + vector primitives_; Spanner *finished_ligature_; - Array finished_primitives_; + vector finished_primitives_; - Music *prev_start_req_; + Stream_event *prev_start_event_; // moment where ligature started. Moment ligature_start_mom_; Grob *last_bound_; - - void override_stencil_callback (); - void revert_stencil_callback (); }; #endif // LIGATURE_ENGRAVER_HH