X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Ftranslator.hh;h=f5065f50b25e3f613bc61bcb107a149b3defd56b;hb=a9d9433bc7b95cb2d4b3d96eefce7a8437c0d44e;hp=cadb56f1a921a7c928be4a70f2a5a74a1f7736bc;hpb=3465d3e1c1d2b87f7a1adc5c7c1dfe868c754e57;p=lilypond.git diff --git a/lily/include/translator.hh b/lily/include/translator.hh index cadb56f1a9..f5065f50b2 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -3,17 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2006 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys */ #ifndef TRANSLATOR_HH #define TRANSLATOR_HH #include "global-ctor.hh" -#include "std-string.hh" #include "lily-proto.hh" #include "virtual-methods.hh" -#include "input.hh" +#include "input.hh" // for error reporting #include "smobs.hh" #include "std-vector.hh" #include "protected-scm.hh" @@ -124,7 +123,7 @@ public: Global_context *get_global_context () const; TRANSLATOR_DECLARATIONS (Translator); - DECLARE_SMOBS (Translator, dummy); + DECLARE_SMOBS (Translator); protected: // should be private. Context *daddy_context_; @@ -142,6 +141,16 @@ protected: // should be private. void add_translator (Translator *trans); Translator *get_translator (SCM s); +Moment get_event_length (Stream_event *s, Moment now); Moment get_event_length (Stream_event *s); DECLARE_UNSMOB (Translator, translator); + + +/* + 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_HH