summaryrefslogtreecommitdiff
path: root/lily/dynamic-align-engraver.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-align-engraver.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-align-engraver.cc')
-rw-r--r--lily/dynamic-align-engraver.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/lily/dynamic-align-engraver.cc b/lily/dynamic-align-engraver.cc
index 0abb39a7f2..29f35b4f61 100644
--- a/lily/dynamic-align-engraver.cc
+++ b/lily/dynamic-align-engraver.cc
@@ -64,11 +64,6 @@ Dynamic_align_engraver::Dynamic_align_engraver ()
current_dynamic_spanner_ = 0;
}
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, stem);
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, footnote_spanner);
-ADD_END_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
void
Dynamic_align_engraver::create_line_spanner (Grob *cause)
@@ -232,6 +227,16 @@ Dynamic_align_engraver::stop_translation_timestep ()
support_.clear ();
}
+void
+Dynamic_align_engraver::boot ()
+{
+ ADD_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
+ ADD_ACKNOWLEDGER (Dynamic_align_engraver, rhythmic_head);
+ ADD_ACKNOWLEDGER (Dynamic_align_engraver, stem);
+ ADD_ACKNOWLEDGER (Dynamic_align_engraver, footnote_spanner);
+ ADD_END_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
+}
+
ADD_TRANSLATOR (Dynamic_align_engraver,
/* doc */
"Align hairpins and dynamic texts on a horizontal line.",