X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fswallow-perf.cc;h=150e61b274a8d7977b7df7df02a992ad8b1e782f;hb=9e752ec70a160d6c3d7632036de75630438c4142;hp=332964af408d088720a1dc468110e0d7113b5143;hpb=48bdd9154a32245a075494b403639181615864e2;p=lilypond.git diff --git a/lily/swallow-perf.cc b/lily/swallow-perf.cc index 332964af40..150e61b274 100644 --- a/lily/swallow-perf.cc +++ b/lily/swallow-perf.cc @@ -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 Han-Wen Nienhuys + (c) 1997--2006 Han-Wen Nienhuys */ -#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_PERFORMER(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 */ "");