From 96f781e48607995af9d4e6b33c5c314296a7b5d9 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:51:08 +0000 Subject: [PATCH] lilypond-0.1.7 --- lily/bar-grav.cc | 4 ++-- lily/include/musical-request.hh | 12 +++++++----- lily/request.cc | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/lily/bar-grav.cc b/lily/bar-grav.cc index 3362ce0024..3847e9a5ba 100644 --- a/lily/bar-grav.cc +++ b/lily/bar-grav.cc @@ -24,7 +24,7 @@ Bar_engraver::do_try_request(Request*r_l) if (!c_l|| !c_l->bar()) return false; Bar_req * b= c_l->bar(); - if (bar_req_l_ && bar_req_l_->compare(*b)) + if (bar_req_l_ && bar_req_l_->equal_b(b)) return false; bar_req_l_ = b; @@ -55,7 +55,7 @@ void Bar_engraver::do_pre_move_processing() { if (bar_p_) { - typeset_breakable_item(bar_p_); + typeset_element(bar_p_); bar_p_ =0; } } diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 782541d689..6152be7782 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -51,9 +51,10 @@ public: /* *************** */ void set_duration(Duration); - static int compare(const Rhythmic_req &, const Rhythmic_req &); + bool do_equal_b(Request*)const; virtual Moment duration() const; Rhythmic_req(); + static int compare(Rhythmic_req const&,Rhythmic_req const&); REQUESTMETHODS(Rhythmic_req, rhythmic); }; @@ -88,7 +89,7 @@ public: Text_req(int d, Text_def*); ~Text_req(); Text_req(Text_req const&); - static int compare(const Text_req&,const Text_req&); + REQUESTMETHODS(Text_req,text); }; @@ -120,8 +121,8 @@ struct Melodic_req :virtual Musical_req /// return pitch from central c (in halfnotes) int pitch()const; Melodic_req(); - static int compare(Melodic_req const&, Melodic_req const&); - + bool do_equal_b(Request*)const; + static int compare( Melodic_req const&,Melodic_req const&); REQUESTMETHODS(Melodic_req,melodic); }; @@ -132,6 +133,7 @@ public: /// force/supress printing of accidental. bool forceacc_b_; Note_req(); + bool do_equal_b(Request*)const; Rhythmic_req* rhythmic() { return Rhythmic_req::rhythmic(); } REQUESTMETHODS(Note_req, note); }; @@ -166,7 +168,7 @@ public: enum { NOSPAN, START, STOP } spantype ; - static int compare(const Span_req &r1, const Span_req &r2); + bool do_equal_b(Request*)const; REQUESTMETHODS(Span_req,span); Span_req(); diff --git a/lily/request.cc b/lily/request.cc index 15a90ca6e3..36589b6455 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -23,3 +23,21 @@ Request::time_int() const return MInterval(0, duration()); } + +bool +Request::equal_b(Request *r)const +{ + if ( is_type_b ( r->name() ) ) + return r->do_equal_b( (Request*)this ); + if ( r->is_type_b( name ())) + return do_equal_b( r ); + + return false; +} + +bool +Request::do_equal_b(Request*)const +{ + return false; +} + -- 2.39.5