2 type-swallow-engraver.hh -- declare Type_swallow_translator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef TYPESWALLOW_GRAV_HH
11 #define TYPESWALLOW_GRAV_HH
13 #include "translator.hh"
15 /** eat a certain type of event
16 (Duh, it's good for your skin)
18 class Type_swallow_translator
: public virtual Translator
21 String swallow_string_
;
22 bool try_music (Music
*);
24 VIRTUAL_COPY_CONS (Translator
);
27 #define DECLARE_EVENT_SWALLOWER(TYPE) \
28 struct TYPE ## _swallow_translator : public Type_swallow_translator { \
29 TRANSLATOR_DECLARATIONS (TYPE ## _swallow_translator); \
31 TYPE ## _swallow_translator :: TYPE ## _swallow_translator() {\
32 swallow_string_ = #TYPE; \
34 ENTER_DESCRIPTION(TYPE ## _swallow_translator, \
35 "Swallow events of " #TYPE " type.", \
42 #endif // TYPESWALLOW_GRAV_HH