*** empty log message ***
[lilypond.git] / lily / include / type-swallow-translator.hh
bloba97ab6ac06b9c92c72ac213577aa7b97b9b8a157
1 /*
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>
7 */
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
20 protected:
21 String swallow_string_;
22 bool try_music (Music*);
23 public:
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); \
30 }; \
31 TYPE ## _swallow_translator :: TYPE ## _swallow_translator() {\
32 swallow_string_ = #TYPE; \
33 } \
34 ENTER_DESCRIPTION(TYPE ## _swallow_translator, \
35 "Swallow events of " #TYPE " type.", \
36 "", \
37 "general-music",\
38 "", \
39 "", \
40 "");
42 #endif // TYPESWALLOW_GRAV_HH