source file of the GNU LilyPond music typesetter
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "type-swallow-translator.hh"
-#include "musical-request.hh"
+#include "translator.hh"
+#include "music.hh"
-DECLARE_REQUEST_SWALLOWER (Skip_req);
+#include "translator.icc"
-bool
-Type_swallow_translator::do_try_music (Music*r)
+class Skip_event_swallow_translator : public Translator
+{
+protected:
+ virtual bool try_music (Music *) { return true; }
+
+public:
+ TRANSLATOR_DECLARATIONS (Skip_event_swallow_translator);
+};
+
+class Rest_swallow_translator : public Translator
+{
+protected:
+ virtual bool try_music (Music *) { return true; }
+
+public:
+ TRANSLATOR_DECLARATIONS (Rest_swallow_translator);
+};
+
+Skip_event_swallow_translator::Skip_event_swallow_translator ()
+{
+}
+
+ADD_TRANSLATOR (Skip_event_swallow_translator,
+ "Swallow \\skip.",
+ "",
+ "skip-event",
+ "",
+ "");
+
+Rest_swallow_translator::Rest_swallow_translator (){}
+
+ADD_TRANSLATOR (Rest_swallow_translator,
+ "Swallow rest",
+ "",
+ "rest-event",
+ "",
+ "");
+
+class Note_swallow_translator : public Translator
+{
+protected:
+ virtual bool try_music (Music *) { return true; }
+
+public:
+ TRANSLATOR_DECLARATIONS (Note_swallow_translator);
+};
+
+Note_swallow_translator::Note_swallow_translator ()
{
- if (classname (r) == swallow_str_)
- return true;
- return false;
}
+
+ADD_TRANSLATOR (Note_swallow_translator,
+ "Swallow notes",
+ "",
+ "note-event",
+ "",
+
+ "");
+