summaryrefslogtreecommitdiff
path: root/lily
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-06-18 18:25:25 +0200
committerDavid Kastrup <dak@gnu.org>2016-07-04 10:01:56 +0200
commitca91c4fef862a54df0c4af18235883518c475576 (patch)
treeb315a8965bc2308b1c023be016017c79ae5f9560 /lily
parent3d76daf5b141b8ceeb3a04a7d001bfec857e1f1e (diff)
Issue 4906/4: Use ADD_LISTENER/ACKNOWLEDGER_FOR in slur engravers
Diffstat (limited to 'lily')
-rw-r--r--lily/include/slur-engraver.hh5
-rw-r--r--lily/phrasing-slur-engraver.cc31
-rw-r--r--lily/slur-engraver.cc40
3 files changed, 12 insertions, 64 deletions
diff --git a/lily/include/slur-engraver.hh b/lily/include/slur-engraver.hh
index 1f057069d1..705ec597e8 100644
--- a/lily/include/slur-engraver.hh
+++ b/lily/include/slur-engraver.hh
@@ -48,14 +48,9 @@ protected:
virtual SCM grob_symbol () const;
virtual const char* object_name () const;
- void acknowledge_inline_accidental (Grob_info);
- void acknowledge_fingering (Grob_info);
void acknowledge_note_column (Grob_info);
void acknowledge_script (Grob_info);
- void acknowledge_dots (Grob_info);
- void acknowledge_text_script (Grob_info);
void acknowledge_end_tie (Grob_info);
- void acknowledge_tuplet_number (Grob_info);
void listen_note (Stream_event *ev);
// A slur on an in-chord note is not actually announced as an event
diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc
index cdb50cd9c4..556ef092ad 100644
--- a/lily/phrasing-slur-engraver.cc
+++ b/lily/phrasing-slur-engraver.cc
@@ -29,10 +29,6 @@ class Phrasing_slur_engraver : public Slur_engraver
virtual const char* object_name () const;
virtual void set_melisma (bool);
-protected:
- void listen_phrasing_slur (Stream_event *);
- void acknowledge_slur (Grob_info);
-
public:
TRANSLATOR_DECLARATIONS (Phrasing_slur_engraver);
TRANSLATOR_INHERIT (Slur_engraver);
@@ -72,32 +68,19 @@ Phrasing_slur_engraver::set_melisma (bool)
}
void
-Phrasing_slur_engraver::listen_phrasing_slur (Stream_event *ev)
-{
- Slur_engraver::listen_slur (ev);
-}
-
-void
-Phrasing_slur_engraver::acknowledge_slur (Grob_info info)
-{
- acknowledge_extra_object (info);
-}
-
-
-void
Phrasing_slur_engraver::boot ()
{
- ADD_LISTENER (Phrasing_slur_engraver, phrasing_slur);
+ ADD_LISTENER_FOR (Phrasing_slur_engraver, slur, phrasing_slur);
ADD_LISTENER (Phrasing_slur_engraver, note);
- ADD_ACKNOWLEDGER (Phrasing_slur_engraver, inline_accidental);
- ADD_ACKNOWLEDGER (Phrasing_slur_engraver, fingering);
+ ADD_ACKNOWLEDGER_FOR (Phrasing_slur_engraver, extra_object, inline_accidental);
+ ADD_ACKNOWLEDGER_FOR (Phrasing_slur_engraver, extra_object, fingering);
ADD_ACKNOWLEDGER (Phrasing_slur_engraver, note_column);
- ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur);
+ ADD_ACKNOWLEDGER_FOR (Phrasing_slur_engraver, extra_object, slur);
ADD_ACKNOWLEDGER (Phrasing_slur_engraver, script);
- ADD_ACKNOWLEDGER (Phrasing_slur_engraver, dots);
- ADD_ACKNOWLEDGER (Phrasing_slur_engraver, text_script);
+ ADD_ACKNOWLEDGER_FOR (Phrasing_slur_engraver, extra_object, dots);
+ ADD_ACKNOWLEDGER_FOR (Phrasing_slur_engraver, extra_object, text_script);
ADD_END_ACKNOWLEDGER (Phrasing_slur_engraver, tie);
- ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tuplet_number);
+ ADD_ACKNOWLEDGER_FOR (Phrasing_slur_engraver, extra_object, tuplet_number);
}
ADD_TRANSLATOR (Phrasing_slur_engraver,
diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc
index ff9065ca10..f87e541ab0 100644
--- a/lily/slur-engraver.cc
+++ b/lily/slur-engraver.cc
@@ -68,14 +68,14 @@ Slur_engraver::boot ()
{
ADD_LISTENER (Slur_engraver, slur);
ADD_LISTENER (Slur_engraver, note);
- ADD_ACKNOWLEDGER (Slur_engraver, inline_accidental);
- ADD_ACKNOWLEDGER (Slur_engraver, fingering);
+ ADD_ACKNOWLEDGER_FOR (Slur_engraver, extra_object, inline_accidental);
+ ADD_ACKNOWLEDGER_FOR (Slur_engraver, extra_object, fingering);
ADD_ACKNOWLEDGER (Slur_engraver, note_column);
ADD_ACKNOWLEDGER (Slur_engraver, script);
- ADD_ACKNOWLEDGER (Slur_engraver, text_script);
- ADD_ACKNOWLEDGER (Slur_engraver, dots);
+ ADD_ACKNOWLEDGER_FOR (Slur_engraver, extra_object, text_script);
+ ADD_ACKNOWLEDGER_FOR (Slur_engraver, extra_object, dots);
ADD_END_ACKNOWLEDGER (Slur_engraver, tie);
- ADD_ACKNOWLEDGER (Slur_engraver, tuplet_number);
+ ADD_ACKNOWLEDGER_FOR (Slur_engraver, extra_object, tuplet_number);
}
ADD_TRANSLATOR (Slur_engraver,
@@ -171,30 +171,6 @@ Slur_engraver::acknowledge_extra_object (Grob_info info)
}
void
-Slur_engraver::acknowledge_inline_accidental (Grob_info info)
-{
- acknowledge_extra_object (info);
-}
-
-void
-Slur_engraver::acknowledge_dots (Grob_info info)
-{
- acknowledge_extra_object (info);
-}
-
-void
-Slur_engraver::acknowledge_fingering (Grob_info info)
-{
- acknowledge_extra_object (info);
-}
-
-void
-Slur_engraver::acknowledge_tuplet_number (Grob_info info)
-{
- acknowledge_extra_object (info);
-}
-
-void
Slur_engraver::acknowledge_script (Grob_info info)
{
if (!info.grob ()->internal_has_interface (ly_symbol2scm ("dynamic-interface")))
@@ -202,12 +178,6 @@ Slur_engraver::acknowledge_script (Grob_info info)
}
void
-Slur_engraver::acknowledge_text_script (Grob_info info)
-{
- acknowledge_extra_object (info);
-}
-
-void
Slur_engraver::acknowledge_end_tie (Grob_info info)
{
acknowledge_extra_object (info);