From: fred Date: Tue, 29 Oct 1996 18:58:39 +0000 (+0000) Subject: lilypond-0.0.5 X-Git-Tag: release/1.5.59~7005 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=95ca39198e68b3d52e06146e82738a887470e8c3;p=lilypond.git lilypond-0.0.5 --- diff --git a/mtime.hh b/mtime.hh deleted file mode 100644 index ef01d2314b..0000000000 --- a/mtime.hh +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef MTIME_HH -#define MTIME_HH - -#include "real.hh" - -typedef Real Mtime; - -#endif diff --git a/rhythmstaf.cc b/rhythmstaf.cc index d2a85d62ce..0b9e90e229 100644 --- a/rhythmstaf.cc +++ b/rhythmstaf.cc @@ -17,11 +17,13 @@ Rhythmic_column::Rhythmic_column(Score_column*s, Rhythmic_staff *rs) staff_ = rs; } - +Rhythmic_staff::Rhythmic_staff() +{ + theline = new Linestaff(1); +} void Rhythmic_staff::set_output(PScore* ps ) { - theline = new Linestaff(1); pscore_ = ps; pscore_->add(theline); } @@ -30,7 +32,7 @@ Rhythmic_staff::set_output(PScore* ps ) void Rhythmic_column::process_commands( ) { - int breakstat = BREAK_END; + int breakstat = BREAK_END - BREAK_PRE; for (int i = 0 ; i < s_commands.sz(); i++) { Command *com = s_commands[i]; switch (com->code){ @@ -41,7 +43,7 @@ Rhythmic_column::process_commands( ) case BREAK_POST: case BREAK_END: score_column->set_breakable(); - breakstat = com->code; + breakstat = com->code- BREAK_PRE; break; case TYPESET: @@ -77,7 +79,6 @@ Rhythmic_column::process_requests() the_note = rq; } break; - } } @@ -136,7 +137,7 @@ Rhythmic_column::typeset_req(Request *rq) m->add_right(dm); } i->output=m; - staff_->pscore_->typeset_item(i, score_column->pcol, staff_->theline,0 ); + staff_->pscore_->typeset_item(i, score_column->pcol, staff_->theline ); } void diff --git a/rhythmstaf.hh b/rhythmstaf.hh index 8e362146e3..69b61ec487 100644 --- a/rhythmstaf.hh +++ b/rhythmstaf.hh @@ -32,11 +32,14 @@ struct Rhythmic_column : Staff_column { struct Rhythmic_staff : Staff { /// indirection to the PStaff. PStaff *theline; + + /****************/ void set_output(PScore *); void process_commands( PCursor &where); void grant_requests(); Staff_column * create_col(Score_column*); + Rhythmic_staff(); }; diff --git a/staff.cc b/staff.cc index 0827c953f0..7dd2666dc9 100644 --- a/staff.cc +++ b/staff.cc @@ -17,7 +17,7 @@ Staff::clean_cols() } Staff_column * -Staff::get_col(Mtime w, bool mus) +Staff::get_col(Real w, bool mus) { Score_column* sc = score_->find_col(w,mus); assert(sc->when == w); @@ -65,7 +65,7 @@ Staff::setup_staffcols() for (PCursor vc(voices); vc.ok(); vc++) { - Mtime now = vc->start; + Real now = vc->start; for (PCursor ve(vc->elts); ve.ok(); ve++) { Staff_column *sc=get_col(now,true); @@ -130,9 +130,9 @@ Staff::OK() const } -Mtime +Real Staff::last() const { - Mtime l = 0.0; + Real l = 0.0; for (PCursor vc(voices); vc.ok(); vc++) { l = MAX(l, vc->last()); } @@ -154,3 +154,9 @@ Staff::print() const #endif } +Staff::Staff() +{ + score_ =0; + pscore_=0; + +} diff --git a/staff.hh b/staff.hh index cca8c35266..3d39c6e78b 100644 --- a/staff.hh +++ b/staff.hh @@ -19,6 +19,8 @@ struct Staff { Score *score_; PScore *pscore_; + /****************************************************************/ + void add_voice(Voice *v); void add_staff_column(Staff_column *sp); @@ -28,18 +30,13 @@ struct Staff { /** This routines calls virtual functions from Staff, to delegate the interpretation of requests to a derived class of Staff */ - - - /**************************************************************** - VIRTUALS - ****************************************************************/ - void setup_staffcols(); - virtual void set_output(PScore * destination)=0; - virtual void grant_requests()=0; - - Staff_column * get_col(Mtime,bool); + void OK() const; + void print() const; + Real last() const; + void clean_cols() ; + Staff_column * get_col(Real,bool); void add_commands(PointerListconst & sv); /** @@ -48,12 +45,21 @@ struct Staff { PRE sv is time-ordered. */ + + Staff(); + /** + Should construct with Score as arg, but this isn't known during parsing. + */ + /**************************************************************** + VIRTUALS + ****************************************************************/ + + virtual void set_output(PScore * destination)=0; + virtual void grant_requests()=0; virtual Staff_column * create_col(Score_column * )=0; + virtual ~Staff() { } - void OK() const; - void print() const; - Mtime last() const; - void clean_cols() ; - virtual ~Staff() { } }; #endif + +