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;
Bar_engraver::do_pre_move_processing()
{
if (bar_p_) {
- typeset_breakable_item(bar_p_);
+ typeset_element(bar_p_);
bar_p_ =0;
}
}
/* *************** */
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);
};
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);
};
/// 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);
};
/// 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);
};
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();
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;
+}
+