]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/swallow-perf.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / swallow-perf.cc
index 5f2cbb2873423a086dc9b7b294f16a44acb8bd34..150e61b274a8d7977b7df7df02a992ad8b1e782f 100644 (file)
@@ -1,13 +1,40 @@
 /*
-  swallow-perf.cc -- implement Swallow_performer
+  swallow-performer.cc -- implement Swallow_performer
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
-#include "swallow-perf.hh"
+#include "performer.hh"
+#include "music.hh"
 
+class Swallow_performer : public Performer
+{
+public:
+  TRANSLATOR_DECLARATIONS (Swallow_performer);
+protected:
+  virtual bool try_music (Music *);
+};
 
-IMPLEMENT_IS_TYPE_B1(Swallow_performer, Performer);
-ADD_THIS_TRANSLATOR(Swallow_performer);
+bool
+Swallow_performer::try_music (Music *m)
+{
+  if (m->is_mus_type ("busy-playing-event")
+      || m->is_mus_type ("melisma-playing-event"))
+    return false;
+  else
+    return true;
+}
+
+Swallow_performer::Swallow_performer ()
+{}
+
+#include "translator.icc"
+
+ADD_TRANSLATOR (Swallow_performer,
+               /* doc */ "",
+               /* create */ "",
+               /* accept */ "general-music",
+               /* read */ "",
+               /* write */ "");