]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-reg.cc
release: 0.0.68pre
[lilypond.git] / lily / bar-reg.cc
index c66a33bdb4cab77d877adfe4b79dd76083b76d2c..46f7bf3b82f3b0903690fbf332c75f4f2157703b 100644 (file)
 
 Bar_register::Bar_register()
 {
-    post_move_processing();
+    do_post_move_processing();
 }
 
 bool
-Bar_register::try_request(Request*r_l)
+Bar_register::do_try_request(Request*r_l)
 {
     Command_req* c_l = r_l->command();
     if (!c_l|| !c_l->bar()) 
@@ -32,12 +32,13 @@ Bar_register::try_request(Request*r_l)
 }
 
 void
-Bar_register::process_requests()
+Bar_register::do_process_requests()
 {
     if (bar_req_l_ ) {
-       bar_p_ = new Bar(bar_req_l_->type_str_);
+       bar_p_ = new Bar;
+       bar_p_->type_str_=bar_req_l_->type_str_;
     } else if (!get_staff_info().time_C_->whole_in_measure_) {
-       bar_p_ = new Bar("|");
+       bar_p_ = new Bar;
     }
     
     if (bar_p_){
@@ -46,42 +47,24 @@ Bar_register::process_requests()
 }
 
 
-
-void
-Bar_register::split_bar(Bar *& pre, Bar * no, Bar * &post)
-{
-    String s= no->type;
-    if (s == ":|:") {
-       pre = new Bar(":|");
-       post = new Bar("|:");
-    }else if (s=="|:") {
-       post = new Bar(s);
-    } else {
-       pre = new Bar(*no);
-    }
-}
-
 void 
-Bar_register::pre_move_processing()
+Bar_register::do_pre_move_processing()
 {
       if (bar_p_) {
-         Bar * post_p =0;
-         Bar * pre_p =0;
-         split_bar(pre_p, bar_p_, post_p);
-         
-         typeset_breakable_item(pre_p, bar_p_, post_p);
+         typeset_breakable_item(bar_p_);
          bar_p_ =0;
       }
 }
 
 void
-Bar_register::post_move_processing()
+Bar_register::do_post_move_processing()
 {
     bar_req_l_ = 0;
     bar_p_ =0;
 }
 
 IMPLEMENT_STATIC_NAME(Bar_register);
+IMPLEMENT_IS_TYPE_B1(Bar_register,Request_register);
 ADD_THIS_REGISTER(Bar_register);