From cd93507bb0b0559c7d916c1b19d7ac1f83d1cc8e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 10 Jan 2004 20:19:05 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 2 ++ lily/breathing-sign-engraver.cc | 6 ------ lily/clef-engraver.cc | 6 ------ lily/custos-engraver.cc | 17 +++++------------ lily/dynamic-engraver.cc | 13 ++++--------- lily/extender-engraver.cc | 6 +----- lily/gregorian-ligature-engraver.cc | 4 ++-- lily/horizontal-bracket-engraver.cc | 9 ++------- lily/hyphen-engraver.cc | 6 ------ lily/ligature-engraver.cc | 10 +++------- lily/lyric-engraver.cc | 6 ------ lily/mark-engraver.cc | 9 +-------- lily/metronome-engraver.cc | 6 +----- lily/piano-pedal-engraver.cc | 17 ++++++----------- lily/rhythmic-column-engraver.cc | 7 +------ lily/script-column-engraver.cc | 7 ------- lily/script-engraver.cc | 7 ------- lily/slur-engraver.cc | 5 ----- lily/span-dynamic-performer.cc | 6 +----- lily/tab-note-heads-engraver.cc | 6 ------ lily/text-engraver.cc | 5 ----- lily/text-spanner-engraver.cc | 10 ++-------- lily/translator.cc | 9 +++++++++ 23 files changed, 40 insertions(+), 139 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65d186628d..d7173ad428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-01-10 Han-Wen Nienhuys + * lily/*.cc: remove superfluous start_translation_timestep() calls. + * lily/translator-group.cc (get_simple_trans_list): new function; construct simple_trans_list_ lazily. diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 3f8acc774a..7d49c31d73 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -30,7 +30,6 @@ protected: virtual bool try_music (Music *req); virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); private: Music * breathing_sign_req_; @@ -71,11 +70,6 @@ Breathing_sign_engraver::stop_translation_timestep () typeset_grob (breathing_sign_); breathing_sign_ = 0; } -} - -void -Breathing_sign_engraver::start_translation_timestep () -{ breathing_sign_req_ = 0; } diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 44b8be7cba..6ffa8a9fe7 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -27,7 +27,6 @@ public: protected: virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void process_music (); virtual void acknowledge_grob (Grob_info); private: @@ -190,11 +189,6 @@ Clef_engraver::stop_translation_timestep () } } -void -Clef_engraver::start_translation_timestep () -{ -} - ENTER_DESCRIPTION(Clef_engraver, diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index ed50050923..46c82969c6 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -25,7 +25,6 @@ class Custos_engraver : public Engraver { public: TRANSLATOR_DECLARATIONS( Custos_engraver); - virtual void start_translation_timestep (); virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); @@ -47,22 +46,17 @@ Custos_engraver::Custos_engraver () void Custos_engraver::stop_translation_timestep () -{ - /* - delay typeset until we're at the next moment, so we can silence custodes at the end of the piece. - */ -} - -void -Custos_engraver::start_translation_timestep () { for (int i = custodes_.size (); i--;) { typeset_grob (custodes_[i]); } - custodes_.clear (); - pitches_.clear (); + /* + delay clear until we're at the next moment, so we can silence + custodes at the end of the piece. + */ + pitches_.clear (); custos_permitted = false; } @@ -139,7 +133,6 @@ Custos_engraver::finalize () for (int i = custodes_.size (); i--;) { custodes_[i]->suicide (); - typeset_grob (custodes_[i]); } custodes_.clear (); } diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index a8bb1d2f89..478339ea7c 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -64,7 +64,6 @@ protected: virtual bool try_music (Music *req); virtual void stop_translation_timestep (); virtual void process_music (); - virtual void start_translation_timestep (); }; @@ -84,14 +83,6 @@ Dynamic_engraver::Dynamic_engraver () accepted_spanreqs_drul_[STOP] = 0; } -void -Dynamic_engraver::start_translation_timestep () -{ - script_ev_ = 0; - accepted_spanreqs_drul_[START] = 0; - accepted_spanreqs_drul_[STOP] = 0; -} - bool Dynamic_engraver::try_music (Music * m) { @@ -302,6 +293,10 @@ Dynamic_engraver::stop_translation_timestep () line_spanner_ =0; typeset_all (); } + + script_ev_ = 0; + accepted_spanreqs_drul_[START] = 0; + accepted_spanreqs_drul_[STOP] = 0; } void diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index eb2b31f7aa..9279849bb2 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -26,7 +26,6 @@ protected: virtual void finalize (); virtual bool try_music (Music*); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void process_music (); private: @@ -116,15 +115,12 @@ Extender_engraver::stop_translation_timestep () if (extender_) finished_extender_ = extender_; extender_ = 0; -} -void -Extender_engraver::start_translation_timestep () -{ ev_ = 0; } + ENTER_DESCRIPTION(Extender_engraver, /* descr */ "Create lyric extenders", /* creats*/ "LyricExtender", diff --git a/lily/gregorian-ligature-engraver.cc b/lily/gregorian-ligature-engraver.cc index b1c1a826ba..98e7fddc5c 100644 --- a/lily/gregorian-ligature-engraver.cc +++ b/lily/gregorian-ligature-engraver.cc @@ -263,9 +263,9 @@ Gregorian_ligature_engraver::build_ligature (Spanner *ligature, } void -Gregorian_ligature_engraver::start_translation_timestep () +Gregorian_ligature_engraver::stop_translation_timestep () { - Ligature_engraver::start_translation_timestep (); + Ligature_engraver::stop_translation_timestep (); pes_or_flexa_req_ = 0; } diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index 3db54efbf2..e86c7553bb 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lily/horizontal-bracket-engraver.cc @@ -23,7 +23,6 @@ public: int push_count_; virtual bool try_music(Music*); - virtual void start_translation_timestep (); virtual void stop_translation_timestep (); virtual void process_music (); virtual void acknowledge_grob (Grob_info); @@ -43,12 +42,6 @@ Horizontal_bracket_engraver::Horizontal_bracket_engraver() push_count_ = 0; } -void -Horizontal_bracket_engraver::start_translation_timestep() -{ - pop_count_ = 0; - push_count_ = 0; -} bool Horizontal_bracket_engraver::try_music (Music *m) @@ -121,6 +114,8 @@ Horizontal_bracket_engraver::stop_translation_timestep () if (bracket_stack_.size()) typeset_grob (bracket_stack_.pop()); } + pop_count_ = 0; + push_count_ = 0; } diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index b5f7fd1e2c..8282baa5da 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -36,7 +36,6 @@ protected: virtual void finalize (); virtual bool try_music (Music*); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void process_acknowledged_grobs (); private: @@ -121,11 +120,6 @@ Hyphen_engraver::stop_translation_timestep () last_lyric_ = current_lyric_; current_lyric_ =0; } -} - -void -Hyphen_engraver::start_translation_timestep () -{ req_ = 0; } diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index e355e5c3ec..8f59721773 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -218,13 +218,6 @@ Ligature_engraver::process_music () } } -void -Ligature_engraver::start_translation_timestep () -{ - reqs_drul_[START] = 0; - reqs_drul_[STOP] = 0; -} - void Ligature_engraver::typeset_ligature (Spanner *, Array) { @@ -242,6 +235,9 @@ Ligature_engraver::stop_translation_timestep () finished_primitives_.clear (); finished_ligature_ = 0; } + + reqs_drul_[START] = 0; + reqs_drul_[STOP] = 0; } void diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 33ced39172..850326cb57 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -24,7 +24,6 @@ protected: virtual void stop_translation_timestep (); virtual bool try_music (Music *); virtual void process_music (); - virtual void start_translation_timestep (); public: TRANSLATOR_DECLARATIONS(Lyric_engraver); @@ -75,11 +74,6 @@ Lyric_engraver::stop_translation_timestep () typeset_grob (text_); text_ =0; } -} - -void -Lyric_engraver::start_translation_timestep () -{ req_ =0; } diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index dc75369fc7..f2808db119 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -37,7 +37,6 @@ protected: virtual void acknowledge_grob (Grob_info); void create_items (Music*); virtual bool try_music (Music *req); - virtual void start_translation_timestep (); virtual void process_music (); private: @@ -78,6 +77,7 @@ Mark_engraver::stop_translation_timestep () typeset_grob (text_); text_ =0; } + mark_req_ = 0; } @@ -92,13 +92,6 @@ Mark_engraver::create_items (Music *rq) } -void -Mark_engraver::start_translation_timestep () -{ - mark_req_ = 0; -} - - bool Mark_engraver::try_music (Music* r) { diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index 32d15cafe8..80fe67837b 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -69,6 +69,7 @@ Metronome_mark_engraver::stop_translation_timestep () typeset_grob (text_); text_ =0; } + mark_req_ = 0; } @@ -84,11 +85,6 @@ Metronome_mark_engraver::create_items (Music *rq) announce_grob(text_, rq->self_scm()); } -void -Metronome_mark_engraver::start_translation_timestep () -{ - mark_req_ = 0; -} bool Metronome_mark_engraver::try_music (Music* r) diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 5204f51f68..0b4f957b9d 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -67,7 +67,6 @@ protected: virtual void finalize (); virtual bool try_music (Music*); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void acknowledge_grob (Grob_info); virtual void process_music (); @@ -483,6 +482,12 @@ Piano_pedal_engraver::stop_translation_timestep () } typeset_all (); + + for (Pedal_info*p = info_list_; p->name_; p ++) + { + p->event_drul_[STOP] = 0; + p->event_drul_[START] = 0; + } } @@ -556,16 +561,6 @@ Piano_pedal_engraver::typeset_all () } } -void -Piano_pedal_engraver::start_translation_timestep () -{ - for (Pedal_info*p = info_list_; p->name_; p ++) - { - p->event_drul_[STOP] = 0; - p->event_drul_[START] = 0; - } -} - ENTER_DESCRIPTION (Piano_pedal_engraver, /* descr */ "Engrave piano pedal symbols and brackets.", /* creats*/ "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner", diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 998717c663..324d37ebc1 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -61,7 +61,6 @@ protected: virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); }; @@ -164,11 +163,7 @@ Rhythmic_column_engraver::stop_translation_timestep () last_spacing_ = spacing_; spacing_ =0; } -} - -void -Rhythmic_column_engraver::start_translation_timestep () -{ + dotcol_ =0; stem_ =0; } diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index 9ef23f328a..a35b401815 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -26,7 +26,6 @@ protected: virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); }; @@ -43,13 +42,7 @@ Script_column_engraver::stop_translation_timestep () typeset_grob (scol_); scol_ =0; } -} - -void -Script_column_engraver::start_translation_timestep () -{ scripts_.clear (); - } void diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 9b7e1e769c..bfce6c5a1f 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -34,7 +34,6 @@ public: protected: virtual bool try_music (Music*); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void process_music (); virtual void acknowledge_grob (Grob_info); }; @@ -210,12 +209,6 @@ Script_engraver::stop_translation_timestep () scripts_.clear (); } -void -Script_engraver::start_translation_timestep () -{ - scripts_.clear (); -} - Script_engraver::Script_engraver(){} diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index baeda35fda..132ea54ca2 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -194,11 +194,6 @@ Slur_engraver::stop_translation_timestep () typeset_grob (end_slurs_[i]); } end_slurs_.clear (); -} - -void -Slur_engraver::start_translation_timestep () -{ new_slur_evs_.clear (); } diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 740eb1a648..854aa59d47 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -30,7 +30,6 @@ protected: virtual void acknowledge_audio_element (Audio_element_info); virtual void process_music (); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); private: Audio_dynamic* audio_; @@ -161,13 +160,10 @@ Span_dynamic_performer::stop_translation_timestep () play_element (audio_); audio_ = 0; } -} -void -Span_dynamic_performer::start_translation_timestep () -{ span_req_l_drul_[STOP] = 0; span_req_l_drul_[START] = 0; + } bool diff --git a/lily/tab-note-heads-engraver.cc b/lily/tab-note-heads-engraver.cc index e0ba6ec18e..fe24b7a53b 100644 --- a/lily/tab-note-heads-engraver.cc +++ b/lily/tab-note-heads-engraver.cc @@ -30,7 +30,6 @@ public: TRANSLATOR_DECLARATIONS(Tab_note_heads_engraver); protected: - virtual void start_translation_timestep (); virtual bool try_music (Music *event) ; virtual void process_music (); @@ -180,11 +179,6 @@ Tab_note_heads_engraver::stop_translation_timestep () tabstring_events_.clear (); } -void -Tab_note_heads_engraver::start_translation_timestep () -{ -} - ENTER_DESCRIPTION(Tab_note_heads_engraver, /* descr */ "Generate one or more tablature noteheads from Music of type NoteEvent.", diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index fe64b4473d..5cdc157f0d 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -133,11 +133,6 @@ Text_engraver::stop_translation_timestep () typeset_grob (ti); } texts_.clear (); -} - -void -Text_engraver::start_translation_timestep () -{ reqs_.clear (); } diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index bbd3ef376c..52893847f8 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -20,7 +20,6 @@ protected: virtual void acknowledge_grob (Grob_info); virtual bool try_music (Music *); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void process_music (); private: @@ -41,13 +40,6 @@ Text_spanner_engraver::Text_spanner_engraver () req_drul_[STOP] = 0; } -void -Text_spanner_engraver::start_translation_timestep () -{ - req_drul_[START] = 0; - req_drul_[STOP] = 0; -} - bool Text_spanner_engraver::try_music (Music *m) { @@ -147,6 +139,8 @@ Text_spanner_engraver::stop_translation_timestep () } typeset_all (); + req_drul_[START] = 0; + req_drul_[STOP] = 0; } void diff --git a/lily/translator.cc b/lily/translator.cc index 6f323bbfed..e27c740a03 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -88,6 +88,15 @@ Translator:: stop_translation_timestep () { } +/* + this function has 2 properties + + - It is called before try_music() + + - It is called before any user information enters the translators. + (i.e. any \property is not processed yet.) + + */ void Translator::start_translation_timestep () { -- 2.39.2