2 type-swallow-grav.hh -- declare Type_swallow_translator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #ifndef TYPESWALLOW_GRAV_HH
11 #define TYPESWALLOW_GRAV_HH
13 #include "translator.hh"
14 /// eat a certain type of request
15 class Type_swallow_translator : public virtual Translator
19 bool do_try_request (Request*);
21 DECLARE_MY_RUNTIME_TYPEINFO;
22 TRANSLATOR_CLONE(Type_swallow_translator);
23 Type_swallow_translator ();
26 #define DECLARE_REQUEST_SWALLOWER(TYPE) \
27 struct TYPE ## _swallow_translator : public Type_swallow_translator {\
28 TYPE ## _swallow_translator() { \
29 type_ = TYPE::static_name ();\
31 DECLARE_MY_RUNTIME_TYPEINFO;\
32 TRANSLATOR_CLONE(TYPE ## _swallow_translator);\
34 IMPLEMENT_IS_TYPE_B1(TYPE ## _swallow_translator, Type_swallow_translator);\
35 ADD_THIS_TRANSLATOR(TYPE ## _swallow_translator);\
37 #endif // TYPESWALLOW_GRAV_HH