]> git.donarmstrong.com Git - lilypond.git/blob - lily/voice-devnull-engraver.cc
ed5e782706b56c44820057833212bcfccff4ec24
[lilypond.git] / lily / voice-devnull-engraver.cc
1 /*
2   voice-devnull-engraver.cc -- implement Voice_devnull_engraver
3
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "engraver.hh"
10 #include "item.hh"
11 #include "musical-request.hh"
12 #include "translator-group.hh"
13
14 class Voice_devnull_engraver : public Engraver
15 {
16 public:
17   VIRTUAL_COPY_CONS (Translator);
18   
19 protected:
20   virtual void acknowledge_element (Score_element_info);
21 };
22
23 ADD_THIS_TRANSLATOR (Voice_devnull_engraver);
24
25 void
26 Voice_devnull_engraver::acknowledge_element (Score_element_info i)
27 {
28   if (daddy_trans_l_->id_str_ == "two"
29       && (to_boolean (get_property ("unison"))
30           || to_boolean (get_property ("unisilence"))))
31     {
32       static char const *junk[] = {
33         //      "beam-interface",
34         "slur-interface",
35         "tie-interface",
36         "text-item-interface",
37         "text-script-interface",
38         "dynamic-interface",
39         "crescendo-interface",
40         0
41       };
42       for (char const **p = junk; *p; *p++)
43         {
44           if (i.elem_l_->has_interface (ly_symbol2scm (*p)))
45             {
46               i.elem_l_->suicide ();
47               return;
48             }
49         }
50     }
51 }