Index: lily/include/translator.hh |
diff --git a/lily/include/translator.hh b/lily/include/translator.hh |
index dd0659bf50866ec4a9e03e86565deffc0299f7dd..cd050917123c2e52599c4c042ef23156fee0ddb0 100644 |
--- a/lily/include/translator.hh |
+++ b/lily/include/translator.hh |
@@ -38,11 +38,24 @@ |
/* end #define */ |
#define TRANSLATOR_INHERIT(BASE) \ |
- using BASE::method_finder |
+ using BASE::method_finder; \ |
+ using BASE::ack_finder; |
#define DECLARE_TRANSLATOR_CALLBACKS(NAME) \ |
template <void (NAME::*mf)()> \ |
- static SCM method_finder () { return method_find_base<NAME, mf> (); } \ |
+ static SCM method_finder () \ |
+ { \ |
+ return Callback0_wrapper::make_smob<NAME, mf> (); \ |
+ } \ |
+ template <void (NAME::*mf)(Stream_event *)> \ |
+ static SCM method_finder () \ |
+ { \ |
+ return Callback_wrapper::make_smob<trampoline<NAME, mf> > (); \ |
+ } \ |
+ template <void (NAME::*callback)(Grob_info)> \ |
+ static SCM ack_finder () { \ |
+ return Callback2_wrapper::make_smob<ack_trampoline <NAME, callback> > (); \ |
+ } \ |
/* end #define */ |
/* |
@@ -146,16 +159,20 @@ protected: // should be private. |
return SCM_UNSPECIFIED; |
} |
- template <class T, void (T::*mf)()> |
- static SCM |
- method_find_base () { return Callback0_wrapper::make_smob<T, mf> (); } |
- |
// Fallback for non-overriden callbacks for which &T::x degrades to |
// &Translator::x |
template <void (Translator::*)()> |
static SCM |
method_finder () { return SCM_UNDEFINED; } |
+ // Overriden in Engraver. Don't instantiate. |
+ template <class T, void (T::*)(Grob_info)> |
+ static SCM ack_trampoline (SCM, SCM, SCM); |
+ |
+ // Overriden in Engraver. Don't instantiate. |
+ template <void (Translator::*)(Grob_info)> |
+ static SCM ack_finder (); |
+ |
virtual void derived_mark () const; |
static SCM event_class_symbol (const char *ev_class); |
SCM static_translator_description (const char *grobs, |