X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fscheme-engraver.hh;h=7ec28c4c9a6972249c703e4e3a23ad8ebf1c8b9a;hb=905109ea0e90efa8d9c1ba02769e458a0707cc47;hp=997743152a169e7a1a066eb7d95a31a1a934e69b;hpb=058370efc7e9710f149d0f444328bb1fcd7bdec1;p=lilypond.git diff --git a/lily/include/scheme-engraver.hh b/lily/include/scheme-engraver.hh index 997743152a..7ec28c4c9a 100644 --- a/lily/include/scheme-engraver.hh +++ b/lily/include/scheme-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - Copyright (c) 2009--2014 Han-Wen Nienhuys + Copyright (c) 2009--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 @@ -26,54 +26,47 @@ class Scheme_engraver : public Engraver { -public: void init_from_scheme (SCM definition); - TRANSLATOR_DECLARATIONS_NO_LISTENER (Scheme_engraver); - - static Listener get_listener (void *generic_arg, SCM event); +public: + TRANSLATOR_FAMILY_DECLARATIONS (Scheme_engraver); + Scheme_engraver (SCM definition); protected: ~Scheme_engraver (); - void stop_translation_timestep (); - void start_translation_timestep (); - void process_music (); - void process_acknowledged (); - virtual void initialize (); virtual void finalize (); virtual void derived_mark () const; - virtual translator_listener_record *get_listener_list () const; + virtual SCM get_listener_list () const; virtual bool must_be_last () const; private: - void acknowledge_grob_by_hash (Grob_info info, SCM iface_function_hash); - void init_acknowledgers (SCM alist, SCM *hash); - - DECLARE_ACKNOWLEDGER (grob); - DECLARE_END_ACKNOWLEDGER (grob); + virtual SCM get_acknowledger (SCM sym) + { + return generic_get_acknowledger (sym, interface_acknowledger_hash_); + } + virtual SCM get_end_acknowledger (SCM sym) + { + return generic_get_acknowledger (sym, interface_end_acknowledger_hash_); + } + + SCM init_acknowledgers (SCM alist); + // For now no description. In future, something derived from the + // definition might make sense. + SCM translator_description () const { return SCM_EOL; } bool must_be_last_; - SCM acknowledge_grob_function_; - SCM stop_translation_timestep_function_; - SCM start_translation_timestep_function_; - SCM process_music_function_; - SCM process_acknowledged_function_; SCM initialize_function_; SCM finalize_function_; + SCM precomputable_methods_ [TRANSLATOR_METHOD_PRECOMPUTE_COUNT]; // hashq table of interface-symbol -> scheme-function SCM interface_acknowledger_hash_; SCM interface_end_acknowledger_hash_; // Alist of listened-symbol . scheme-function - SCM listeners_alist_; - - // We dont use this, but need it for the documentation boilerplate. - static translator_listener_record *listener_list_; - translator_listener_record *per_instance_listeners_; + SCM per_instance_listeners_; }; #endif /* SCHEME_ENGRAVER_HH */ -