From bd7b422b1796049dee832848f00f9180bcc4bdf6 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 18 Nov 2000 12:46:17 +0100 Subject: [PATCH] patch::: 1.3.108.jcn4 --- VERSION | 2 +- input/test/grace.ly | 2 +- lily/align-note-column-engraver.cc | 5 ++ lily/auto-beam-engraver.cc | 96 ++++++++++------------- lily/beam-engraver.cc | 5 +- lily/engraver-group-engraver.cc | 66 ++++++++++------ lily/include/engraver-group-engraver.hh | 6 +- lily/include/lily-proto.hh | 3 - lily/include/musical-request.hh | 18 ----- lily/include/performer-group-performer.hh | 4 + lily/include/translator-group.hh | 4 +- lily/include/translator.hh | 23 +----- lily/music-output-def.cc | 1 + lily/note-heads-engraver.cc | 12 --- lily/performer-group-performer.cc | 73 ++++++++++------- lily/score-engraver.cc | 38 ++++++--- lily/staff-performer.cc | 2 +- lily/staff-symbol-engraver.cc | 13 +-- lily/time-signature-engraver.cc | 11 ++- lily/timing-engraver.cc | 3 +- lily/translator-group.cc | 11 +-- lily/translator.cc | 62 --------------- 22 files changed, 189 insertions(+), 271 deletions(-) diff --git a/VERSION b/VERSION index 2dfd11b7dc..3c75bd37de 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=108 -MY_PATCH_LEVEL=jcn3 +MY_PATCH_LEVEL=jcn4 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/grace.ly b/input/test/grace.ly index ee5fe5da8e..a4c033c0ff 100644 --- a/input/test/grace.ly +++ b/input/test/grace.ly @@ -10,5 +10,5 @@ \grace { \property Grace.graceAlignPosition = \right c16} c4 } \paper {linewidth = -1.;} -\midi{ } +%%\midi{ } } diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 426ec31c9b..3c935ebb41 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -110,8 +110,13 @@ Align_note_column_engraver::process_acknowledged () } } + if (now_column_l_ && !align_item_p_) + programming_error ("Align_note_column_engraver:: urg\n"); + else + if (now_column_l_) { + Align_interface::add_element (align_item_p_,now_column_l_); now_column_l_ =0; } diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 5fb3ade284..65ce4f1b5d 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -29,13 +29,12 @@ public: VIRTUAL_COPY_CONS (Translator); protected: - virtual bool do_try_music (Music*); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); virtual void do_removal_processing (); virtual void acknowledge_element (Score_element_info); - void deprecated_process_music (); virtual void process_acknowledged (); + private: void begin_beam (); void consider_end_and_begin (Moment test_mom); @@ -70,18 +69,6 @@ Auto_beam_engraver::Auto_beam_engraver () grouping_p_ = 0; } -bool -Auto_beam_engraver::do_try_music (Music*) -{ - return false; -} - -void -Auto_beam_engraver::deprecated_process_music () -{ - consider_end_and_begin (shortest_mom_); -} - void Auto_beam_engraver::consider_end_and_begin (Moment test_mom) { @@ -189,9 +176,9 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom) else r = Moment (1); - if (stem_l_arr_p_ && !r) + if (stem_l_arr_p_ && stem_l_arr_p_->size () > 1 && !r) end_beam (); - + /* Allow already started autobeam to end */ @@ -204,19 +191,7 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom) if (!stem_l_arr_p_ && (!begin_mom || !r)) begin_beam (); } - -void -Auto_beam_engraver::begin_beam () -{ - assert (!stem_l_arr_p_); - stem_l_arr_p_ = new Link_array; - assert (!grouping_p_); - grouping_p_ = new Beaming_info_list; - beam_start_moment_ = now_mom (); - beam_start_location_ = *unsmob_moment (get_property ("measurePosition")); -} - Spanner* Auto_beam_engraver::create_beam_p () { @@ -240,6 +215,30 @@ Auto_beam_engraver::create_beam_p () return beam_p; } +void +Auto_beam_engraver::begin_beam () +{ + assert (!stem_l_arr_p_); + stem_l_arr_p_ = new Link_array; + assert (!grouping_p_); + grouping_p_ = new Beaming_info_list; + beam_start_moment_ = now_mom (); + beam_start_location_ = *unsmob_moment (get_property ("measurePosition")); +} + + +void +Auto_beam_engraver::junk_beam () +{ + assert (stem_l_arr_p_); + + delete stem_l_arr_p_; + stem_l_arr_p_ = 0; + delete grouping_p_; + grouping_p_ = 0; + shortest_mom_ = Moment (1, 8); +} + void Auto_beam_engraver::end_beam () { @@ -293,6 +292,19 @@ Auto_beam_engraver::do_post_move_processing () void Auto_beam_engraver::do_pre_move_processing () { + if (stem_l_arr_p_) + { + Moment now = now_mom (); + if ((extend_mom_ < now) + || ((extend_mom_ == now) && (last_add_mom_ != now ))) + { + end_beam (); + } + else if (!stem_l_arr_p_->size ()) + { + junk_beam (); + } + } typeset_beam (); } @@ -402,33 +414,9 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info) } } -void -Auto_beam_engraver::junk_beam () -{ - assert (stem_l_arr_p_); - - delete stem_l_arr_p_; - stem_l_arr_p_ = 0; - delete grouping_p_; - grouping_p_ = 0; - shortest_mom_ = Moment (1, 8); -} - void Auto_beam_engraver::process_acknowledged () { - deprecated_process_music (); - if (stem_l_arr_p_) - { - Moment now = now_mom (); - if ((extend_mom_ < now) - || ((extend_mom_ == now) && (last_add_mom_ != now ))) - { - end_beam (); - } - else if (!stem_l_arr_p_->size ()) - { - junk_beam (); - } - } + if (!stem_l_arr_p_) + consider_end_and_begin (shortest_mom_); } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 71c77da118..f9603d6ed8 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -23,6 +23,9 @@ class Beam_engraver : public Engraver { Drul_array reqs_drul_; + Link_array stems_; + + Spanner *finished_beam_p_; Spanner *beam_p_; Span_req * prev_start_req_; @@ -128,7 +131,7 @@ Beam_engraver::deprecated_process_music () } - if (beam_p_ && !to_boolean (get_property ("weAreGraceContext"))) + if (beam_p_ && !to_boolean (get_property ("weAreGraceContext"))) { Score_engraver * e = 0; Translator * t = daddy_grav_l (); diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index 2e753f543d..c6734e481f 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -24,6 +24,35 @@ Engraver_group_engraver::announce_element (Score_element_info info) } +void +Engraver_group_engraver::process_acknowledged () +{ + + for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr ( p)) + { + Translator * t = unsmob_translator (gh_car (p)); + Engraver * eng = dynamic_cast (t); + if (eng) + eng->process_acknowledged (); + } +} + +void +Engraver_group_engraver::acknowledge_elements () +{ + for (int j =0; j < announce_info_arr_.size(); j++) + { + Score_element_info info = announce_info_arr_[j]; + for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p)) + { + Translator * t = unsmob_translator (gh_car (p)); + Engraver * eng = dynamic_cast (t); + if (eng && eng!= info.origin_trans_l_) + eng->acknowledge_element (info); + } + } +} + void Engraver_group_engraver::do_announces() { @@ -33,36 +62,23 @@ Engraver_group_engraver::do_announces() dynamic_cast (t)->do_announces (); } + process_acknowledged (); + // debug int i = 0; - do + while (announce_info_arr_.size () && i++ < 5) { - i++; - for (int j =0; j < announce_info_arr_.size(); j++) - { - Score_element_info info = announce_info_arr_[j]; - - if (i > 10) - printf ("elt: %s\n", - announce_info_arr_[j].elem_l_->name ().ch_C ()); - for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p)) - { - Translator * t = unsmob_translator (gh_car (p)); - Engraver * eng = dynamic_cast (t); - if (eng && eng!= info.origin_trans_l_) - eng->acknowledge_element (info); - } - } + acknowledge_elements (); + announce_info_arr_.clear (); + process_acknowledged (); + } + + if (announce_info_arr_.size ()) + { + printf ("do_announces: elt: %s\n", + announce_info_arr_[0].elem_l_->name ().ch_C ()); announce_info_arr_.clear (); - for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr ( p)) - { - Translator * t = unsmob_translator (gh_car (p)); - Engraver * eng = dynamic_cast (t); - if (eng) - eng->process_acknowledged (); - } } - while (announce_info_arr_.size ()); } diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh index dd378bf0e0..f0dd31468a 100644 --- a/lily/include/engraver-group-engraver.hh +++ b/lily/include/engraver-group-engraver.hh @@ -32,9 +32,13 @@ protected: public: VIRTUAL_COPY_CONS(Translator); - + virtual void do_announces(); virtual void announce_element (Score_element_info); + +private: + void process_acknowledged (); + void acknowledge_elements (); }; #endif // ENGRAVERGROUP_HH diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index b1fba08ddd..36f23ac634 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -36,7 +36,6 @@ class Bar_engraver; class Bar_req_collect_engraver; class Barcheck_req; class Base_span_bar_engraver; -class Bass_req; class Beaming_info_list; class Bezier; class Bezier_bow; @@ -69,7 +68,6 @@ class Hyphen_req; class Identifier; class Includable_lexer; class Input; -class Inversion_req; class Item; class Key_change_req; class Key_performer; @@ -179,7 +177,6 @@ class Time_signature_performer; class Timing_engraver; class Timing_req; class Timing_translator; -class Tonic_req; class Translation_property; class Translator; class Translator_change; diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 9dee1567a0..a19a427aa6 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -88,24 +88,6 @@ protected: VIRTUAL_COPY_CONS(Music); }; -/// specify tonic of a chord -struct Tonic_req : public Melodic_req -{ - VIRTUAL_COPY_CONS (Music); -}; - -/// specify inversion of a chord -struct Inversion_req : public Melodic_req -{ - VIRTUAL_COPY_CONS (Music); -}; - -/// specify bass of a chord -struct Bass_req : public Melodic_req -{ - VIRTUAL_COPY_CONS (Music); -}; - /* Put a note of specified type, height, and with accidental on the staff. /// force/supress printing of accidental. diff --git a/lily/include/performer-group-performer.hh b/lily/include/performer-group-performer.hh index 9764275cc1..4ad9637d0f 100644 --- a/lily/include/performer-group-performer.hh +++ b/lily/include/performer-group-performer.hh @@ -25,6 +25,10 @@ public: virtual void announce_element (Audio_element_info); protected: Array announce_info_arr_; + +private: + void process_acknowledged (); + void acknowledge_elements (); }; #endif // PERFORMER_GROUP_PERFORMER_HH diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 63b2d70ffc..acdd1b84f5 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -66,11 +66,9 @@ public: Translator_group*get_default_interpreter(); -protected: +public: bool try_music_on_nongroup_children (Music *m); - - void deprecated_process_music (); virtual void do_announces (); virtual void do_add_processing (); virtual bool do_try_music (Music* req_l); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 083c169106..479393f209 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -51,8 +51,6 @@ public: bool try_music (Music*); void pre_move_processing(); void add_processing (); - void creation_processing (); - void process_music(); void announces(); void post_move_processing(); void removal_processing(); @@ -76,30 +74,11 @@ public: SCM properties_scm_; DECLARE_SMOBS(Translator, dummy); public: - /* - UGH. Clean this up. - */ - enum { - ORPHAN, - VIRGIN, - CREATION_INITED, - MOVE_INITED, - ACCEPTED_REQS, - PROCESSED_REQS, - ACKED_REQS, - MOVE_DONE - } status_; // junkme -protected: - - /* - @see{try_request} - Default: always return false - */ + virtual void do_add_processing (); virtual bool do_try_music (Music *req_l); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); - void deprecated_process_music () ; virtual void do_announces () ; virtual void do_creation_processing() ; virtual void do_removal_processing(); diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index bd8fd57ff3..098a86ab39 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -74,6 +74,7 @@ Music_output_def::get_global_translator_p () Translator_group * tg = t->instantiate (this); tg->add_processing (); + tg->do_creation_processing (); return dynamic_cast (tg); } diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 310a180fad..8fdbd9b4c8 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -52,18 +52,6 @@ Note_heads_engraver::do_try_music (Music *m) note_req_l_arr_.push (n); note_end_mom_ = note_end_mom_ >? now_mom () + m->length_mom (); - return true; - } - else if ( dynamic_cast (m)) - { - return true; - } - else if ( dynamic_cast (m)) - { - return true; - } - else if (dynamic_cast (m)) - { return true; } else if (dynamic_cast (m)) diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index d594e49b92..5254c2e15e 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -25,6 +25,35 @@ Performer_group_performer::announce_element (Audio_element_info info) +void +Performer_group_performer::process_acknowledged () +{ + for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr ( p)) + { + Translator * t = unsmob_translator (gh_car (p)); + Performer * eng = dynamic_cast (t); + if (eng) + eng->process_acknowledged (); + } +} + +void +Performer_group_performer::acknowledge_elements () +{ + for (int j =0; j < announce_info_arr_.size(); j++) + { + Audio_element_info info = announce_info_arr_[j]; + + for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p)) + { + Translator * t = unsmob_translator (gh_car (p)); + Performer * eng = dynamic_cast (t); + if (eng && eng!= info.origin_trans_l_) + eng->acknowledge_element (info); + } + } +} + void Performer_group_performer::do_announces() { @@ -33,41 +62,25 @@ Performer_group_performer::do_announces() Translator * t = unsmob_translator (gh_car (p)); dynamic_cast (t)->do_announces (); } + + process_acknowledged (); + // debug int i = 0; - do - { - i++; - for (int j =0; j < announce_info_arr_.size(); j++) - { - Audio_element_info info = announce_info_arr_[j]; - - if (i > 10) - { - printf ("elt: %s\n", - classname (announce_info_arr_[j].elem_l_)); - announce_info_arr_.clear (); - } - - for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p)) - { - Translator * t = unsmob_translator (gh_car (p)); - Performer * eng = dynamic_cast (t); - if (eng && eng!= info.origin_trans_l_) - eng->acknowledge_element (info); - } - } + while (announce_info_arr_.size () && i++ < 5) + { + acknowledge_elements (); + announce_info_arr_.clear (); + process_acknowledged (); + } + + if (announce_info_arr_.size ()) + { + printf ("do_announces: elt: %s\n", + classname (announce_info_arr_[0].elem_l_)); announce_info_arr_.clear (); - for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr ( p)) - { - Translator * t = unsmob_translator (gh_car (p)); - Performer * eng = dynamic_cast (t); - if (eng) - eng->process_acknowledged (); - } } - while (announce_info_arr_.size ()); } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index fb3dc39108..55a9e1fa63 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -32,20 +32,27 @@ Score_engraver::prepare (Moment w) { Global_translator::prepare (w); - set_columns (new Paper_column (get_property (ly_symbol2scm ("NonMusicalPaperColumn"))), - new Paper_column (get_property (ly_symbol2scm ("PaperColumn")))); - - command_column_l_->set_elt_property ("when", w.smobbed_copy()); - musical_column_l_->set_elt_property ("when", w.smobbed_copy()); - command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); - - Score_element_info i1(command_column_l_, 0), i2 (musical_column_l_,0); - i1.origin_trans_l_ = this; - i2.origin_trans_l_ = this; - announce_element (i1); - announce_element (i2); + /* + ugh. + */ + if (!command_column_l_ + || *unsmob_moment (command_column_l_->get_elt_property ("when")) != w) + { + set_columns (new Paper_column (get_property (ly_symbol2scm ("NonMusicalPaperColumn"))), + new Paper_column (get_property (ly_symbol2scm ("PaperColumn")))); + command_column_l_->set_elt_property ("when", w.smobbed_copy()); + musical_column_l_->set_elt_property ("when", w.smobbed_copy()); + command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); + + Score_element_info i1(command_column_l_, 0), i2 (musical_column_l_,0); + + i1.origin_trans_l_ = this; + i2.origin_trans_l_ = this; + announce_element (i1); + announce_element (i2); + } post_move_processing(); } @@ -65,6 +72,7 @@ Score_engraver::finish() void Score_engraver::do_creation_processing () { + prepare (Moment (0)); scoreline_l_ = pscore_p_->line_l_; scoreline_l_->set_bound(LEFT, command_column_l_); @@ -123,7 +131,11 @@ Score_engraver::do_announces() void Score_engraver::typeset_element (Score_element *elem_p) { - elem_p_arr_.push (elem_p); + if (!elem_p) + programming_error ("Score_engraver: empty elt\n"); + else + + elem_p_arr_.push (elem_p); } diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 61014a0d16..c877b114e2 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -55,7 +55,7 @@ Staff_performer::deprecated_process_music () instrument_p_ = new Audio_instrument (str); announce_element (Audio_element_info (instrument_p_, 0)); } - Performer_group_performer::deprecated_process_music (); + // Performer_group_performer::deprecated_process_music (); } void diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 520bcc701d..4abe57d181 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -62,16 +62,9 @@ Staff_symbol_engraver::do_removal_processing() void Staff_symbol_engraver::acknowledge_element (Score_element_info s) { - ////// assert (span_p_); - ////// ik weet 't zo onderhand echt niet meer - ///// if (!span_p_) - ///// do_creation_processing (); - if (!span_p_) - { - status_ = VIRGIN; - creation_processing (); - } - s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm ()); + s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm ()); + + // remove this. probly not necessary? s.elem_l_->add_dependency (span_p_); // UGH. UGH. UGH } diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 2499bcba2e..e6181a17b1 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -19,8 +19,8 @@ */ class Time_signature_engraver : public Engraver { protected: - void deprecated_process_music(); virtual void do_pre_move_processing(); + virtual void process_acknowledged (); public: VIRTUAL_COPY_CONS(Translator); Item * time_signature_p_; @@ -36,7 +36,7 @@ Time_signature_engraver::Time_signature_engraver() } void -Time_signature_engraver::deprecated_process_music() +Time_signature_engraver::process_acknowledged() { /* not rigorously safe, since the value might get GC'd and @@ -47,12 +47,15 @@ Time_signature_engraver::deprecated_process_music() last_time_fraction_ = fr; time_signature_p_ = new Item (get_property ("TimeSignature")); time_signature_p_->set_elt_property ("fraction",fr); + + if (time_signature_p_) + announce_element (time_signature_p_, 0); } - if (time_signature_p_) - announce_element (time_signature_p_, 0); } + + void Time_signature_engraver::do_pre_move_processing() { diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 7643a2cfa7..acf416664a 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -37,7 +37,8 @@ Timing_engraver::do_post_move_processing( ) SCM which = get_property ("whichBar"); if (!gh_string_p (which)) - which = now_mom () ? SCM_EOL : ly_str02scm ("|"); + which = now_mom () + ? SCM_EOL : ly_str02scm ("|"); if (!gh_string_p (which) && !to_boolean (nonauto)) { diff --git a/lily/translator-group.cc b/lily/translator-group.cc index aa2541ebe4..5aad20793e 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -71,7 +71,7 @@ Translator_group::add_translator (SCM list, Translator *t) t->daddy_trans_l_ = this; t->output_def_l_ = output_def_l_; t->add_processing (); - + t->do_creation_processing (); return list; } void @@ -417,13 +417,6 @@ Translator_group::do_post_move_processing () each (&Translator::post_move_processing); } -void -Translator_group::deprecated_process_music () -{ - assert (0); - each (&Translator::process_music); -} - void Translator_group::do_announces () { @@ -433,7 +426,7 @@ Translator_group::do_announces () void Translator_group::do_creation_processing () { - each (&Translator::creation_processing); + each (&Translator::do_creation_processing); } void diff --git a/lily/translator.cc b/lily/translator.cc index 2b767bc64a..25e6ca3bad 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -27,7 +27,6 @@ Translator::~Translator () void Translator::init () { - status_ = ORPHAN; simple_trans_list_ = SCM_EOL; trans_group_list_ = SCM_EOL; properties_scm_ = SCM_EOL; @@ -76,11 +75,7 @@ Translator::now_mom () const void Translator::add_processing () { - if (status_ > ORPHAN) - return; - do_add_processing (); - status_ = VIRGIN; } void @@ -88,77 +83,28 @@ Translator::do_add_processing () { } -void -Translator::creation_processing () -{ - if (status_ >= CREATION_INITED) - return ; - - do_creation_processing (); - status_ = CREATION_INITED; -} void Translator::post_move_processing () { - if (status_ >= MOVE_INITED) - return; - - creation_processing (); do_post_move_processing (); - status_ = MOVE_INITED; } void Translator::removal_processing () { - if (status_ == ORPHAN) - return; - creation_processing (); do_removal_processing (); } bool Translator::try_music (Music * r) { - if (status_ < MOVE_INITED) - post_move_processing (); - return do_try_music (r); } - -void -Translator::process_music () -{ - assert (0); - if (status_ < PROCESSED_REQS) - post_move_processing (); - else if (status_ >= PROCESSED_REQS) - return; - - status_ = PROCESSED_REQS; - deprecated_process_music (); -} - -////////// -static int te_vroeg = 0; void Translator::announces () { - #if 0 - if (te_vroeg && te_vroeg < 2) - { - do_creation_processing (); - te_vroeg++; - } - #endif - if (status_ < PROCESSED_REQS) - post_move_processing (); - else if (status_ >= PROCESSED_REQS) - return; - - status_ = PROCESSED_REQS; do_announces (); } @@ -167,7 +113,6 @@ void Translator::pre_move_processing () { do_pre_move_processing (); - status_ = CREATION_INITED; } @@ -200,21 +145,14 @@ Translator::do_post_move_processing () { } -void -Translator::deprecated_process_music () -{ -} - void Translator::do_announces () { } -//////////// void Translator::do_creation_processing () { - te_vroeg++; } void -- 2.39.5