summaryrefslogtreecommitdiff
path: root/lily/dynamic-performer.cc
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-05-29 09:28:51 +0200
committerDavid Kastrup <dak@gnu.org>2016-05-31 11:14:18 +0200
commitdbaf1e56e37be0e204231c5bf1adcb14bd8ac3b8 (patch)
tree72ef0ea2bdc704ce797c7437c1c110b1ceb56a3b /lily/dynamic-performer.cc
parent4b4a2cae9953cff69159f10763e990f5e4265ddd (diff)
Issue 4865/2: Rewrite of new translator initializations
This was done by running the following Bash script: git grep '^ADD_TRANSLATOR (' lily|sed 's/^\([^:]*\):ADD_TRANSLATOR ( *\([a-zA-Z_]\+\),.*$/\1 \2/' | while read file translator do lines="$(git grep -h '^\(ADD_ACKNOWLEDGER\|ADD_END_ACKNOWLEDGER\|IMPLEMENT_TRANSLATOR_LISTENER\) ('$translator, $file)" sed -i "$(echo "$lines"|sed 's+^..*$+/&/d+')" $file sed -i "/^ADD_TRANSLATOR ($translator,/i\\ void\\ $translator::boot ()\\ {\\ $(echo "$lines"|sed 's/IMPLEMENT_TRANSLATOR_LISTENER/ADD_LISTENER/;s/^./ &/;s/$/\\/') }\\ " $file done
Diffstat (limited to 'lily/dynamic-performer.cc')
-rw-r--r--lily/dynamic-performer.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc
index 6a6f8b8cf9..567184412e 100644
--- a/lily/dynamic-performer.cc
+++ b/lily/dynamic-performer.cc
@@ -206,7 +206,6 @@ Dynamic_performer::stop_translation_timestep ()
= span_events_[RIGHT] = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, decrescendo);
void
Dynamic_performer::listen_decrescendo (Stream_event *r)
{
@@ -215,7 +214,6 @@ Dynamic_performer::listen_decrescendo (Stream_event *r)
grow_dir_[d] = SMALLER;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, crescendo);
void
Dynamic_performer::listen_crescendo (Stream_event *r)
{
@@ -224,7 +222,6 @@ Dynamic_performer::listen_crescendo (Stream_event *r)
grow_dir_[d] = BIGGER;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, absolute_dynamic);
void
Dynamic_performer::listen_absolute_dynamic (Stream_event *r)
{
@@ -232,6 +229,14 @@ Dynamic_performer::listen_absolute_dynamic (Stream_event *r)
script_event_ = r;
}
+void
+Dynamic_performer::boot ()
+{
+ ADD_LISTENER (Dynamic_performer, decrescendo);
+ ADD_LISTENER (Dynamic_performer, crescendo);
+ ADD_LISTENER (Dynamic_performer, absolute_dynamic);
+}
+
ADD_TRANSLATOR (Dynamic_performer,
/* doc */
"",