]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.21
authorfred <fred>
Sun, 24 Mar 2002 19:27:17 +0000 (19:27 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:27:17 +0000 (19:27 +0000)
src/idealspacing.cc
src/pcol.cc
src/score.cc
src/simplestaff.cc
src/swalker.cc
src/template1.cc

index c6b84931f6a9124e5aee69d4a2fff81d6f11a35a..3ceaff1e6d5076e94180596b033cea07498c68e8 100644 (file)
@@ -1,3 +1,4 @@
+#include "idealspacing.hh"
 #include "pcol.hh"
 #include "pscore.hh"
 #include "pstaff.hh"
index 7dc4c22c5ab3dbc3696a93f70e50938409881dc3..52df4297d4ab8be9155d8e98220a6f8f2e685368 100644 (file)
@@ -8,12 +8,13 @@ PCol::width() const
 {
     Interval w;
 
-    for (PCursor<const Item *> ic(its); ic.ok(); ic++)
-       w.unite(ic->width());
+    for (iter_top(its,i); i.ok(); i++)
+       w.unite(i->width());
     if (w.empty())
        w.unite(Interval(0,0));
     return w;
 }
+
 int
 PCol::rank() const
 {
index 1593f7be162074892807336c19ef3d5076ebd3d8..2819a21965865df6fe5625a4bc3035a6ebc83ca5 100644 (file)
@@ -16,7 +16,7 @@ Score::process()
     
     /// distribute commands to disciples
     pscore_ = new PScore(paper_);
-    for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
+    for (iter_top(staffs_,i); i.ok(); i++) {
        i->process_commands(last());
        i->set_output(pscore_);
        i->process();
@@ -48,10 +48,10 @@ Score::process()
 void
 Score::clean_cols()
 {    
-    for (PCursor<Staff * > i(staffs_); i.ok(); i++)
+    for (iter_top(staffs_,i); i.ok(); i++)
        i->clean_cols();
     
-    for (PCursor<Score_column*> c(cols_); c.ok(); ) {
+    for (iter_top(cols_,c); c.ok(); ) {
        if (!c->pcol_->used()) {
            c.del();
        } else {
@@ -76,7 +76,7 @@ Score::create_cols(Moment w)
     c1->musical = false;
     c2->musical = true;
     
-    PCursor<Score_column*> i(cols_);
+    iter_top(cols_,i);
 
     for (; i.ok(); i++) {
        assert(i->when != w);
@@ -100,7 +100,7 @@ Score::create_cols(Moment w)
 PCursor<Score_column*>
 Score::find_col(Moment w,bool mus)
 {
-    PCursor<Score_column*> i(cols_);
+    iter_top(cols_,i);
     for (; i.ok(); i++) {
        if (i->when == w && i->musical == mus)
            return i;
@@ -116,7 +116,7 @@ Score::find_col(Moment w,bool mus)
 void
 Score::do_pcols()
 {
-    PCursor<Score_column*> i(cols_);
+    iter_top(cols_,i);
     for (; i.ok(); i++) {
        pscore_->add(i->pcol_);
     }
@@ -125,7 +125,7 @@ Moment
 Score::last() const
 {    
     Moment l = 0;
-    for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
+    for (iter_top(staffs_,i); i.ok(); i++) {
        l = l>? i->last();
     }
     return l;
@@ -135,13 +135,13 @@ void
 Score::OK() const
 {
 #ifndef NDEBUG
-    for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
+    for (iter_top(staffs_,i); i.ok(); i++) {
        i->OK();
        assert(i->score_ == this);
     }
     staffs_.OK();
     cols_.OK();
-    for (PCursor<Score_column*> cc(cols_); cc.ok() && (cc+1).ok(); cc++) {
+    for (iter_top(cols_,cc); cc.ok() && (cc+1).ok(); cc++) {
        assert(cc->when <= (cc+1)->when);
     }
 #endif    
@@ -153,10 +153,10 @@ Score::print() const
 {
 #ifndef NPRINT
     mtor << "score {\n"; 
-    for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
+    for (iter_top(staffs_,i); i.ok(); i++) {
        i->print();
     }
-    for (PCursor<Score_column*> i(cols_); i.ok(); i++) {
+    for (iter_top(cols_,i); i.ok(); i++) {
        i->print();
     }
     if (pscore_)
index 9fe16b593727aca3dc292f4e47b0c0cba9e19d83..636b6691de7515aca6ca459b6e227abe78678bb4 100644 (file)
@@ -18,6 +18,7 @@ Simple_column::Simple_column(Score_column*s, Simple_staff *rs)
     stem_ = 0;    
     staff_ = rs;
     beam_ = 0;
+    text_=0;
 }
 
 Simple_staff::Simple_staff()
@@ -30,7 +31,7 @@ Simple_staff::Simple_staff()
 
     BREAK: all
     TYPESET: bar, meter,
-
+Scalar
     */
 
 
@@ -39,16 +40,21 @@ void
 Simple_column::process_requests()
 {
     for (int i = 0 ; i < v_elts.sz(); i ++)
-       for (PCursor<Request *> rqc(v_elts[i]->reqs); rqc.ok(); rqc++) {
-           Request *rq= rqc;
+       for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) {
+           Request *rq= j;
            if (rq->rhythmic()){
-               notes.add( rq->rhythmic());
+               notes.add(rq->rhythmic());
+           }
+           if (rq->script()) {
+               notes.last().scripts.add(rq->script());
            }
            if (rq->stem()) {
                stem_ = rq->stem();
                stem_requester_len = v_elts[i]->duration;
            }
-
+           if (rq->text()) {
+               text_ = rq->text();
+           }
            if (rq->beam()) {
                beam_ = rq->beam();
            }
@@ -72,4 +78,10 @@ Simple_staff::walk()
        sc.process();
     }
 }
-
+Note_info::Note_info()
+{
+    rq =0;
+}
+Note_info::Note_info(Rhythmic_req*r) {
+    rq = r;
+}
index 130543dd97ac4f9db456583269defb44b002be0a..9e4f1d3ff69970b1fdedd16407381e341038b7a5 100644 (file)
@@ -24,7 +24,7 @@ Staff_walker::process()
 {
     break_status = BREAK_END - BREAK_PRE;
     if (ptr()->s_commands)
-       for (PCursor<Command*> i(*ptr()->s_commands); i.ok(); i++) {
+       for (iter_top(*ptr()->s_commands,i); i.ok(); i++) {
            process_command(i);
     }
 
index 64834ea93e1c373a4e467444d6bf3a0730eae8cf..0a9c288bdedf7f9a04ccda8975b62f2be93a617f 100644 (file)
@@ -1,4 +1,4 @@
-
+#include "idealspacing.hh"
 #include "plist.hh"
 #include "pcol.hh"
 #include "item.hh"
@@ -9,7 +9,7 @@
 #include "staffline.hh"
 
 
-#include "plist.cc"
+#include "plist.tcc"
 
 
 #define IPLC_instantiate(a) IPL_instantiate(a); PL_instantiate(const a)