source file of the GNU LilyPond music typesetter
- (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#ifndef TRANSLATOR_ICC
#include "std-vector.hh"
#include "translator.hh"
+/*
+ TODO: derive "foo-bar-interface" from Foo_bar classname.
+ */
+
/**
A macro to automate administration of translators.
*/
} \
ADD_GLOBAL_CTOR (_ ## T ## _adder);
-#define ADD_TRANSLATOR(classname, desc, grobs, accepted, read, write) \
+#define ADD_TRANSLATOR(classname, desc, grobs, read, write) \
Drul_array< vector<Acknowledge_information> > classname::acknowledge_static_array_drul_; \
IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS (classname); \
ADD_THIS_TRANSLATOR (classname); \
SCM \
classname::static_translator_description () const \
{ \
- SCM static_properties = SCM_EOL; \
- /* static_properties = acons (name , gh_str02scm (Translator::name (self_scm ())), \
- static_properties_); \
- */ \
- static_properties = scm_acons (ly_symbol2scm ("grobs-created"), \
- parse_symbol_list (grobs), static_properties); \
- \
- static_properties = scm_acons (ly_symbol2scm ("description"), \
- scm_makfrom0str (desc), static_properties); \
- \
- static_properties = scm_acons (ly_symbol2scm ("events-accepted"), \
- parse_symbol_list (accepted), static_properties); \
- \
- static_properties = scm_acons (ly_symbol2scm ("properties-read"), \
- parse_symbol_list (read), static_properties); \
- \
- static_properties = scm_acons (ly_symbol2scm ("properties-written"), \
- parse_symbol_list (write), static_properties); \
- \
- return static_properties; \
+ return Translator::static_translator_description (grobs, desc, listener_list_, read, write); \
}
#define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T) \
listen_ ## m (ev); \
}
-/*
- This helper is only meaningful inside listen_* methods.
-*/
-extern bool internal_event_assignment (Stream_event **old_ev, Stream_event *new_ev, const char *function);
-#define ASSIGN_EVENT_ONCE(o,n) internal_event_assignment (&o, n, __FUNCTION__)
-
#endif /* TRANSLATOR_ICC */