]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.7
authorfred <fred>
Sun, 24 Mar 2002 19:51:08 +0000 (19:51 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:51:08 +0000 (19:51 +0000)
lily/bar-grav.cc
lily/include/musical-request.hh
lily/request.cc

index 3362ce00245b059eb3a1a56765dc465a99f475f6..3847e9a5ba298e1043b05f8e457cd8debaca4dc1 100644 (file)
@@ -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;
       }
 }
index 782541d68925c7222f945442ff3d1ca55df2715b..6152be77825b0351eff9169d3b418be504c146ab 100644 (file)
@@ -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();
index 15a90ca6e3de3f4f00320b3b4c45a0e3a627378a..36589b64554f4a81c9c06def26310233f05f986f 100644 (file)
@@ -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;
+}
+