]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.26
authorfred <fred>
Sun, 24 Mar 2002 19:30:06 +0000 (19:30 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:30:06 +0000 (19:30 +0000)
29 files changed:
configure
input/maartje.ly
src/break.cc
src/complexstaff.cc [new file with mode: 0644]
src/complexwalker.cc [new file with mode: 0644]
src/getcommands.cc
src/grouping.cc
src/inputcommand.cc
src/inputscore.cc
src/key.cc
src/keyitem.cc
src/lookup.cc
src/lyriccolumn.cc
src/molecule.cc
src/pscore.cc
src/qlp.cc
src/sccol.cc
src/scores.cc
src/script.cc
src/simplestaff.cc
src/simplewalker.cc
src/slur.cc
src/spanner.cc
src/staff.cc
src/staffcommands.cc
src/stcol.cc
src/stem.cc
src/tex.cc
src/textspanner.cc

index 1f7f7b52381068e462427f8ac69e1d904547c5ac..b10d46123512b12913a13e21accfc82331039a18 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,15 +1,18 @@
 #!/bin/sh
 
+PREFIX=${PREFIX:-.}
+echo using PREFIX=$PREFIX
 
-NEEDFLOWERVER=1.0.21
+NEEDFLOWERVER=1.0.22
 flowertar=flower-$NEEDFLOWERVER
 here=`pwd`
-if [ -x ../flower ]
+cd ..
+if [ -x flower ]
 then
     echo Found flowerdir
 else
-    cd ../
-    if [ ! -f $flowertar ]
+
+    if [ ! -d $flowertar ]
     then
        echo "can't find $flowertar"
        exit 1;
@@ -19,11 +22,10 @@ else
 
 fi
 echo Compiling Library
-cd flower; make
+(cd flower;make)
+
 cd $here
 
-PREFIX="."
 echo '#define LIBDIR "'$PREFIX'/"'> hdr/config.hh
 
-touch depend
 make -f Initial.make
index 7755894effe3ce9094a7365cf286a6fd957398ce..1a7925955f2a8d860673e9e83164025c04250bb6 100644 (file)
@@ -4,9 +4,8 @@
 %
 %
 
-
-
-ritme = staff {rhythmic
+ritme = staff {
+       rhythmic
        music {$
        c8
        |[a8() a8. a8 a16 a16 a16] c4.
@@ -25,6 +24,7 @@ ritme = staff {rhythmic
 
 melody=
 staff { melodic
+%      complex
        music{$
        c8
        |r4 r4 r4 r4
@@ -56,7 +56,7 @@ staff { melodic
                skip 2:0
                key 
                skip 5:0
-               clef "bass"
+               clef bass
        }
 }
 
index 2a0586edff2b0e0775029ba4dcf5074b787c1b04..f3832cf0f608fb3848d1c2a1ad0e66cc27307103 100644 (file)
@@ -19,7 +19,7 @@ Break_algorithm::find_breaks() const
     Array<PCol *> retval;
     for (iter_top(pscore_.cols,c); c.ok(); c++)
        if (c->breakable())
-           retval.add(c);
+           retval.push(c);
 
     return retval;
 }
@@ -82,7 +82,7 @@ Col_configuration::Col_configuration()
 void
 Col_configuration::add( PCol*c)
 {
-    cols.add(c);
+    cols.push(c);
 }
 
 void
diff --git a/src/complexstaff.cc b/src/complexstaff.cc
new file mode 100644 (file)
index 0000000..ffa667e
--- /dev/null
@@ -0,0 +1,58 @@
+#include "request.hh"
+#include "voice.hh"
+#include "staffwalker.hh"
+#include "debug.hh"
+#include "clef.hh"
+#include "staff.hh"
+#include "command.hh"
+#include "complexstaff.hh"
+#include "sccol.hh" 
+#include "complexwalker.hh"
+
+
+
+Complex_column::Complex_column(Score_column*s, Complex_staff *rs)
+    : Staff_column(s)
+{
+    staff_l_ = rs;
+}
+
+Complex_staff::Complex_staff()
+{
+    theline_l_ = 0;
+}
+
+void
+Complex_column::setup_requests()
+{
+    for (int i = 0 ; i < v_elts.size(); i ++)
+       for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) {            
+
+           if (j->barcheck()) {
+               if (tdescription_->whole_in_measure) {
+                   error("Barcheck failed, " + tdescription_->str());
+               }
+               continue;
+           }
+           if (j->mark())
+               continue;
+           if (j->command())
+               continue;
+           todo_l_arr_.push(j);
+       }
+}
+
+Staff_column*
+Complex_staff::create_col(Score_column*s)
+{
+    return new Complex_column(s,this);
+}
+
+void
+Complex_staff::walk()
+{
+    for (Complex_walker sc(this); sc.ok(); sc++) {
+       sc.col()->setup_requests();// TODO
+       sc.process();
+    }
+}
diff --git a/src/complexwalker.cc b/src/complexwalker.cc
new file mode 100644 (file)
index 0000000..5cc1b5b
--- /dev/null
@@ -0,0 +1,241 @@
+#include "associter.hh"
+#include "script.hh"
+#include "request.hh"
+#include "voice.hh"
+#include "clef.hh"
+#include "pscore.hh"
+#include "complexstaff.hh"
+#include "complexwalker.hh"
+#include "sccol.hh"
+#include "debug.hh"
+#include "keyitem.hh"
+#include "clefitem.hh"
+#include "voicegroup.hh"
+#include "register.hh"
+
+Rhythmic_grouping
+cparse_grouping(Array<Scalar> a, Moment one_beat)
+{
+    Array<int> r;
+    for (int i= 0 ; i < a.size(); i++)
+       r.push(a[i]);
+    Moment here =0.0;
+
+    Array<Rhythmic_grouping*> children;
+    for (int i=0; i < r.size(); i++) {
+       
+       Moment last = here;
+       here += one_beat * r[i];
+       children.push(
+           new Rhythmic_grouping(MInterval(last, here), r[i] )
+           );
+    }
+    return Rhythmic_grouping(children);
+}
+
+void
+Complex_walker::do_INTERPRET_command(Command*com)
+{
+    Array<Scalar> args(com->args);
+    args.del(0);
+    if (com->args[0] == "GROUPING") {  
+       default_grouping = cparse_grouping(args,
+                                         col()->tdescription_->one_beat);
+    }else if (com->args[0] == "NEWMEASURE") {
+       local_key_.reset(key_);
+
+    } else if (com->args[0] == "KEY") {
+       
+       if (col()->when() > Moment(0)) {
+           assert(!oldkey_undo);
+           oldkey_undo = new Array<int>( key_.oldkey_undo(args));
+       }
+       
+       typesetkey = key_.read(args);
+       local_key_.reset(key_); 
+    } else if (com->args[0] == "CLEF") {
+       clef_.read(args);
+    } else {
+       WARN << " ignoring INTERPRET command: " << com->args[0]<< "\n";
+    }
+}
+
+void
+Complex_walker::do_TYPESET_command(Command*com)
+{
+    /* ignore these commands if non-default versions have been
+      processed.  */
+    if (com->args[0] == "CURRENTKEY") 
+       if (processed_key) 
+           return;
+       else
+           com->args[0] = "KEY"; // urgh
+    
+    if (com->args[0] == "CURRENTCLEF") {
+       if (processed_clef) 
+           return;
+    }
+    if (com->args[0] == "BAR") {
+       
+       if (processed_bar_priority > com->priority)
+           return;
+       else
+           processed_bar_priority = com->priority;
+    }
+
+    Item* i = staff()->get_TYPESET_item(com);
+    if (!i)
+       return;
+
+    if (com->args[0] == "KEY") {
+       ((Keyitem*) i)->read(clef_);
+       if (oldkey_undo) {
+           ((Keyitem*) i)->read(*oldkey_undo);
+           delete oldkey_undo;
+           oldkey_undo = 0;
+       }
+       processed_key = true;
+       
+       ((Keyitem*) i)->read(typesetkey); // ugh        
+    }
+
+    if (com->args[0] == "CLEF"||com->args[0] == "CURRENTCLEF") {
+       processed_clef =true;
+       Clef_item*c=(Clef_item*)i;
+       c->read(clef_);
+       c->change = (break_status != BREAK_POST - BREAK_PRE);
+    }
+    col()->typeset_item_directional(i, 1, break_status);
+}
+
+void
+Complex_walker::announce_element(Staff_elem_info info)
+{
+    announce_info_arr_.push(info);
+}
+
+void
+Complex_walker::do_announces()
+{
+
+    for (int i = 0; i < announce_info_arr_.size(); i++){
+       Staff_elem_info info = announce_info_arr_[i];
+       for (iter_top(voice_reg_list_,j); j.ok(); j++) {
+           j->announce_element(info);
+       }
+       group_regs_.announce_element(info);
+       local_key_reg_.acknowledge_element(info);
+    }
+}
+
+Voice_registers *
+Complex_walker::find_voice_reg(Voice*v_l)
+{
+    for (iter_top(voice_reg_list_, i); i.ok(); i++) {
+       if (i->voice_l_ == v_l)
+           return i;
+    }
+    
+    Voice_registers *regs_p=new Voice_registers(this,v_l);
+    voice_reg_list_.bottom().add (regs_p);
+    //voice_reg_map_[v_l] = regs_p;
+    return regs_p;
+}
+
+void
+Complex_walker::try_request(Request*req)
+{
+    bool b;
+    if (req->note() || req->rest()|| req->slur()) {
+       Voice *v_l = req->elt_l_->voice_l_;
+       Voice_registers *vregs_l = find_voice_reg(v_l);
+       
+       b = vregs_l->try_request(req);
+           
+    } else {
+       b = group_regs_.try_request(req);
+       if (!b)
+           b = local_key_reg_.try_request(req);
+    }
+    if (!b)
+       WARN<< "junking request: " <<req->name() <<"\n";
+}
+
+void
+Complex_walker::process_requests()
+{
+    Complex_column*c = col();
+//    Complex_staff *s = staff();
+
+    for (int i=0; i < c->todo_l_arr_.size(); i++) {
+       try_request(c->todo_l_arr_[i]);
+    }
+
+    regs_process_requests();
+    do_announces();
+}
+
+void
+Complex_walker::regs_process_requests()
+{
+    for (iter_top(voice_reg_list_,j); j.ok(); j++) {
+       j->process_requests();
+    }
+    group_regs_.process_requests();
+    local_key_reg_.process_request();
+}
+
+void
+Complex_walker::typeset_element(Staff_elem *elem_p)
+{
+    if (elem_p->spanner())
+       pscore_l_->typeset_spanner(elem_p->spanner(), staff()->theline_l_);
+    else
+       col()->typeset_item(elem_p->item()); 
+}
+
+Complex_walker::Complex_walker(Complex_staff*s)
+    : Staff_walker(s, s->theline_l_->pscore_l_),
+      group_regs_(this),
+      local_key_reg_(this)      
+{
+    oldkey_undo = 0;
+    do_post_move();
+}
+
+Complex_staff*
+Complex_walker::staff()
+{
+    return (Complex_staff*) staff_l_;
+}
+
+Complex_column*
+Complex_walker::col()
+{
+    return (Complex_column*) *(*this);
+}
+
+void
+Complex_walker::do_pre_move()
+{
+    for (iter_top(voice_reg_list_,i); i.ok(); i++) {
+       i->pre_move_processing();   
+    }
+    group_regs_.pre_move_processing();
+    local_key_reg_.pre_move_processing();
+}
+
+void
+Complex_walker::do_post_move()
+{
+    processed_clef =false;    
+    processed_key = false;
+    processed_bar_priority = 0;
+    
+    for (iter_top(voice_reg_list_,i); i.ok(); i++) {
+       i->post_move_processing();   
+    }
+    announce_info_arr_.set_size(0);
+    group_regs_.post_move_processing();
+    local_key_reg_.post_move_processing();
+}
index a11e2c0fe32b42be73231a44f93b0b4f9f83ffcc..61a3f59f6297fad552063d63be25cb65fef5d026 100644 (file)
@@ -21,9 +21,9 @@ get_meter_command(int n, int m)
     Command*c = new Command;
     
     c->code = TYPESET;
-    c->args.add( "METER");
-    c->args.add( n );
-    c->args.add( m );
+    c->args.push( "METER");
+    c->args.push( n );
+    c->args.push( m );
     c->priority = 40;
     return c;
 }
@@ -33,8 +33,8 @@ get_defaultbar_command()
 {
     Command c;
     c.code = TYPESET;
-    c.args.add("BAR");
-    c.args.add("default");
+    c.args.push("BAR");
+    c.args.push("default");
     return c;
 }
 
@@ -45,21 +45,21 @@ split_bar_command(Command &pre_com, Command &no_break_com, Command &post_com,
     Command c;
     c.code = TYPESET;
     c.priority = (s=="default") ? 100: 110;
-    c.args.add("BAR");
+    c.args.push("BAR");
     if(s=="default")
        s = "|";
     
     if (s == ":|:") {
        no_break_com=post_com=pre_com = c;
        
-       pre_com.args.add( ":|");
-       no_break_com.args.add( s);
-       post_com.args.add( "|:");
+       pre_com.args.push( ":|");
+       no_break_com.args.push( s);
+       post_com.args.push( "|:");
     }else if (s=="|:") {
-       c.args.add(s);
+       c.args.push(s);
        no_break_com=post_com=c;
     } else {
-       c.args.add(s);
+       c.args.push(s);
        pre_com= no_break_com= c;       
     } 
 }
index 4f02b75378edd735a06133f298c8dd08003a86e7..06f906ff9144a064168e1bf2762a6d340b50aa11 100644 (file)
@@ -67,10 +67,10 @@ Rhythmic_grouping::intervals()
        MInterval i(interval());
        MInterval r1(i), r2(i);
        r1.right = r2.left = i.center();
-       r.add(r1); r.add(r2);
+       r.push(r1); r.push(r2);
     } else {
        for (int i=0; i < children.size(); i++)
-           r.add(children[i]->interval());
+           r.push(children[i]->interval());
     }
     return r;
 }
@@ -124,12 +124,12 @@ Rhythmic_grouping::split(Array<MInterval> splitpoints)
        } else {
 
            if (i == starti) {
-               ch.add(children[i]);
+               ch.push(children[i]);
            } else {
                Rhythmic_grouping *newchild=new Rhythmic_grouping(
                    children.subvec(starti, i+1));
 
-               ch.add(newchild);
+               ch.push(newchild);
            }
            i ++;
            j++;
@@ -154,7 +154,7 @@ Rhythmic_grouping::Rhythmic_grouping(MInterval t, int n)
     Moment dt = t.length()/n;
     MInterval basic = MInterval(t.left, t.left+dt);
     for (int i= 0; i < n; i++)
-       children.add(new Rhythmic_grouping( dt*i + basic ));
+       children.push(new Rhythmic_grouping( dt*i + basic ));
 }
 
 
@@ -174,7 +174,7 @@ Rhythmic_grouping::copy(Rhythmic_grouping const&s)
 {
     interval_ =  (s.interval_)? new MInterval(*s.interval_) : 0;
     for (int i=0; i < s.children.size(); i++)
-       children.add(new Rhythmic_grouping(*s.children[i]));
+       children.push(new Rhythmic_grouping(*s.children[i]));
 }
 
 void
@@ -213,21 +213,22 @@ Rhythmic_grouping::print()const
 #endif
 }
 
+bool
+Rhythmic_grouping::child_fit_query(Moment start)
+{
+    if (children.size())
+       return ( children.last()->interval().right== start);
+
+    return true;
+}  
+
 void
 Rhythmic_grouping::add_child(Moment start, Moment len)
 {
     Moment stop = start+len;
-    for (int i=0; i < children.size(); i ++) {
-       MInterval j=children[i]->interval();
-       if (j.left == start && j.right==stop) {
-           return;
-       }
-    }
-    
-    if (children.size())
-       assert ( children.last()->interval().right== start);
 
-    children.add(new Rhythmic_grouping(MInterval(start, stop)));
+    assert(child_fit_query(start));
+    children.push(new Rhythmic_grouping(MInterval(start, stop)));
 }
 
 Rhythmic_grouping::Rhythmic_grouping()
@@ -255,12 +256,12 @@ Rhythmic_grouping::generate_beams(Array<int> flags, int &flagidx)
        Array<int> child_beams;
        if (children[i]->interval_) {
            int f = flags[flagidx++];
-           child_beams.add(f);
+           child_beams.push(f);
        } else {
            child_beams = children[i]->
                generate_beams(flags, flagidx);
        }
-       children_beams.add(child_beams);
+       children_beams.push(child_beams);
     }
     Array<int> beams;
     int lastm, m, nextm;
@@ -275,15 +276,15 @@ Rhythmic_grouping::generate_beams(Array<int> flags, int &flagidx)
        
        if (children_beams[i].size() == 1) {
            if (add_right)
-               beams.add(m);
+               beams.push(m);
            if (add_left)
-               beams.add(m);
+               beams.push(m);
        } else {
            if (add_left) 
-               beams.add(lastm <? m);
+               beams.push(lastm <? m);
            beams.concat(children_beams[i]);
            if (add_right)
-               beams.add(m <? nextm);
+               beams.push(m <? nextm);
        }
        lastm = m;
        m = nextm;      
index 02e7e7281308b15d25ddecbcd31effcf3c9946d1..251adedc8586840569705802f516fb54124a7ff1 100644 (file)
@@ -39,8 +39,8 @@ Input_command*
 get_partial_command(Moment u)
 {
     Input_command*c = new Input_command;
-    c->args.add("PARTIAL");
-    c->args.add(u);
+    c->args.push("PARTIAL");
+    c->args.push(u);
     return c;
 }
 
@@ -48,8 +48,8 @@ Input_command*
 get_goto_command(String s)
 {
     Input_command*c = new Input_command;
-    c->args.add("GOTO");
-    c->args.add(s);
+    c->args.push("GOTO");
+    c->args.push(s);
     return c;
 }
 
@@ -58,17 +58,17 @@ get_cadenza_toggle(int i)
 {
     
     Input_command*c = new Input_command;
-    c->args.add("CADENZA");
-    c->args.add(i);
+    c->args.push("CADENZA");
+    c->args.push(i);
     return c;
 }
 Input_command*
 get_grouping_command(Array<int>a ) 
 {
     Input_command*c = new Input_command;
-    c->args.add("GROUPING");    
+    c->args.push("GROUPING");    
     for (int i=0; i < a.size(); i ++)
-       c->args.add(a[i]);
+       c->args.push(a[i]);
 
     return c;
 }
@@ -77,9 +77,9 @@ Input_command*
 get_key_interpret_command(Array<int >a ) 
 {
     Input_command*c = new Input_command;
-    c->args.add("KEY");
+    c->args.push("KEY");
     for (int i=0; i < a.size(); i ++) {
-       c->args.add(a[i]);
+       c->args.push(a[i]);
     }
     return c;
 }
@@ -88,7 +88,7 @@ Input_command*
 get_reset_command()
 {
     Input_command*c = new Input_command;
-    c->args.add("RESET");
+    c->args.push("RESET");
     return c;
 }
 
@@ -97,9 +97,9 @@ get_meterchange_command(int n, int m)
 {
     Input_command*c = new Input_command;
 
-    c->args.add( "METER");
-    c->args.add( n );
-    c->args.add( m );
+    c->args.push( "METER");
+    c->args.push( n );
+    c->args.push( m );
 
     return c;
 }
@@ -108,7 +108,7 @@ Input_command *
 get_newmeasure_command()
 {
     Input_command*c = new Input_command;
-    c->args.add( "NEWMEASURE");
+    c->args.push( "NEWMEASURE");
     return c;
 }
 
@@ -117,9 +117,9 @@ get_skip_command(int n, Moment m)
 {
     Input_command*c = new Input_command;
     
-    c->args.add( "SKIP");
-    c->args.add( n );
-    c->args.add( m );
+    c->args.push( "SKIP");
+    c->args.push( n );
+    c->args.push( m );
 
     return c;
 }
@@ -143,8 +143,8 @@ Input_command*
 get_clef_interpret_command(String w)
 {
     Input_command*c = new Input_command;
-    c->args.add("CLEF");
-    c->args.add(w);
+    c->args.push("CLEF");
+    c->args.push(w);
     return c;
 }
 
@@ -152,8 +152,8 @@ Input_command*
 get_bar_command(String w)
 {
     Input_command*c = new Input_command;
-    c->args.add("BAR");
-    c->args.add(w);
+    c->args.push("BAR");
+    c->args.push(w);
     return c;
 }
 
@@ -163,12 +163,12 @@ get_default_grouping(int count)
     Array<int> s;
     if (!(count % 3 )) {
        for (int i=0; i < count/3; i++)
-           s.add(3);
+           s.push(3);
     } else if (!(count %2)) {
        for (int i=0; i < count/2; i++)
-           s.add(2);
+           s.push(2);
     }else {
-       s.add(2);
+       s.push(2);
        s.concat(get_default_grouping(count-2));
     }
     return s;
index 28e1f71599ad8d8be71f50640ca1566e3c6cd517..6ea13d9b5d78a91ee323fe7913ec6ab1ea77c101 100644 (file)
@@ -40,7 +40,7 @@ Input_score::parse()
     Array<Staff*> parsed_staffs;
     for (iter_top(staffs_,i); i.ok(); i++) {
        Staff* staf_p=i->parse(s_p);
-       parsed_staffs.add(staf_p);
+       parsed_staffs.push(staf_p);
        s_p->add(staf_p);
     }
     int j = 0;
index cd7f400737c4a56464ed4d599ca1c016e3e23cbe..232ce9a94fb19afead5e75d4fe25609fe82b8610 100644 (file)
@@ -48,8 +48,8 @@ Key::read(Array<Scalar> s)
        int small = s[i++];
        accidentals[large]=small;
 
-       newkey.add(large);
-       newkey.add(small);
+       newkey.push(large);
+       newkey.push(small);
     }
     return newkey;
 }
@@ -70,8 +70,8 @@ Key::oldkey_undo(Array<Scalar>s)
     }
     for (int i=0; i < newkey.size(); i++)
        if (accidentals[i] && accidentals[i] != newkey[i]) {
-           oldkey.add(i);
-           oldkey.add(0);
+           oldkey.push(i);
+           oldkey.push(0);
        }
     
 
index 9ae9c22289b4f333321375cd0d6ece8c17f78bca..017570d749fa01be41e17a91920cd6f20a352507 100644 (file)
@@ -8,7 +8,7 @@
 
 const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
 const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
-
+NAME_METHOD(Keyitem);
 Keyitem::Keyitem(int c)
 {
     c_position = c;
@@ -39,8 +39,8 @@ Keyitem::add(int p, int a)
         (a>0 && p>SHARP_TOP_PITCH)) {
       p=p-7; /* Typeset below c_position */
     }
-    pitch.add(p);
-    acc.add(a);
+    pitch.push(p);
+    acc.push(a);
 }
 
 
index befa5427065022d9ffd23d54e30de8549578a33e..a9c5d187310aca130b5faea6174b8aa8e1cc39f5 100644 (file)
@@ -33,7 +33,7 @@ Lookup::text(String style, String text, int dir)
 {
     Array<String> a;
  
-    a.add(text);
+    a.push(text);
     Symbol tsym =  (*symtables_)("style")->lookup(style);
     a[0] = substitute_args(tsym.tex,a);
 
@@ -132,7 +132,7 @@ Lookup::streepjes(int i)
     Symbol ret = (*symtables_)("streepjes")->lookup(idx);
     
     Array<String> a;
-    a.add(arg);
+    a.push(arg);
     ret.tex = substitute_args(ret.tex, a);
 
     return ret;
@@ -149,8 +149,8 @@ Lookup::linestaff(int lines, Real wid)
     s.dim.y = Interval(0,dy);
 
     Array<String> a;
-    a.add(lines);
-    a.add(print_dimen(wid));
+    a.push(lines);
+    a.push(print_dimen(wid));
 
     s.tex = (*symtables_)("param")->lookup("linestaf").tex;
     s.tex = substitute_args(s.tex, a);
@@ -182,8 +182,8 @@ Lookup::stem(Real y1,Real y2)
     s.dim.y = Interval(y1,y2);
     
     Array<String> a;
-    a.add(print_dimen(y1));
-    a.add(print_dimen(y2));
+    a.push(print_dimen(y1));
+    a.push(print_dimen(y2));
        
     String src = (*symtables_)("param")->lookup("stem").tex;
     s.tex = substitute_args(src,a);
index 6420c4b3d9554d8426ca67b7d9572875a8245e58..45f30836ed301c05f45b5fc59a03dbddd5f45cfd 100644 (file)
@@ -3,14 +3,12 @@
 #include "staffwalker.hh"
 #include "debug.hh"
 #include "staff.hh"
-#include "command.hh"
-//#include "simplestaff.hh"
+//#include "command.hh"
 #include "lyricstaff.hh"
 #include "lyriccolumn.hh"
 #include "sccol.hh" 
-//#include "simplewalker.hh"
 #include "pscore.hh"
-#include "paper.hh"
+//#include "paper.hh"
 
 
 Lyric_column::Lyric_column(Score_column*s, Lyric_staff* lstaff_l)
@@ -20,7 +18,7 @@ Lyric_column::Lyric_column(Score_column*s, Lyric_staff* lstaff_l)
 }
 
 void
-Lyric_column::process_requests()
+Lyric_column::setup_requests()
 {
     for (int i = 0 ; i < v_elts.size(); i ++) {
        for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) {
@@ -30,13 +28,8 @@ Lyric_column::process_requests()
                    error("Barcheck failed, " + tdescription_->str());
                }
            }
-#if 0
-           if (req_l->rhythmic()){
-               notes.add(rq->rhythmic());
-           }
-#endif
            if (req_l->lreq_l()) {
-               winfo_array_.add(req_l->lreq_l());
+               winfo_array_.push(req_l->lreq_l());
            }
        }
     }
index 682204880d11d95291426140c9037c7c9fd53737..1e09658fee90d91b4632870ea0f31aef385a8383 100644 (file)
@@ -33,9 +33,9 @@ Atom::TeXstring() const
     // whugh.. Hard coded...
     String s("\\placebox{%}{%}{%}");
     Array<String> a;
-    a.add(print_dimen(off.y));
-    a.add(print_dimen(off.x));
-    a.add(sym.tex);
+    a.push(print_dimen(off.y));
+    a.push(print_dimen(off.x));
+    a.push(sym.tex);
     return substitute_args(s, a);
 }
 
index 8251135cdee72571a50900beb286b47a1b1d8f30..83f71f440cb4f434871691d519cb0396cf6231e7 100644 (file)
@@ -143,7 +143,7 @@ PScore::select_items(PStaff*ps, PCol*pc)
     assert(ps && pc);
     for (iter_top(pc->its,i); i.ok(); i++){
        if (i->pstaff_l_ == ps)
-           ret.add((Item*)(const Item*)i);
+           ret.push((Item*)(const Item*)i);
     }
     return ret;
 }
index 5aa8e9f45e7592f21fb9ab8c0a252886e4e9700e..280f0db4ccde40d992b57b9880e770dfe101cdd9 100644 (file)
@@ -12,15 +12,15 @@ Mixed_qp::add_equality_cons(Vector , double )
 void
 Mixed_qp::add_fixed_var(int i, Real r)
 {
-    eq_cons.add(i);
-    eq_consrhs.add(r);
+    eq_cons.push(i);
+    eq_consrhs.push(r);
 }
 
 void
 Ineq_constrained_qp::add_inequality_cons(Vector c, double r)
 {
-    cons.add(c);
-    consrhs.add(r);
+    cons.push(c);
+    consrhs.push(r);
 }
 
 Ineq_constrained_qp::Ineq_constrained_qp(int novars):
@@ -96,7 +96,7 @@ Ineq_constrained_qp::assert_solution(Vector sol) const
        Real R=cons[i] * sol- consrhs[i];
        assert(R> -EPS);
        if (R < EPS)
-           binding.add(i);
+           binding.push(i);
     }
     // KKT check...
     // todo
index bbd0dba1aeda4e56d77c8596591d7d34c106ec7a..14c52796de10c48ae0a58c453c99c41d4be7e6e1 100644 (file)
@@ -58,5 +58,5 @@ Score_column::add_duration(Moment d)
        if (d == durations[i])
            return ;
     }
-    durations.add(d);
+    durations.push(d);
 }
index bdd53716456a8c5097b30af051a06b7a9684d018..6ebbf18a171e986804d9b06ff8d33c6e103c49fe 100644 (file)
@@ -25,7 +25,7 @@ do_scores()
 void
 add_score(Input_score * s)
 {
-    score_array_global.add(s);
+    score_array_global.push(s);
 }
 
 
index eab30f9cbbf636557513da5968b727eb940abbf4..a6c3ee8039fa5b3d3678cbd89c512e8711a70afd 100644 (file)
@@ -5,15 +5,27 @@
 #include "molecule.hh"
 #include "lookup.hh"
 
-Script::Script(Script_req* rq, Item*i , int staflen, Stem*st_l)
+NAME_METHOD(Script);
+
+void
+Script::set_stem(Stem*st_l)
 {
-    dependencies.add(st_l);
-    dependencies.add(i);
-    
+    stem_l_ = st_l;
+    dependencies.push(st_l);
+}
+
+void
+Script::set_support(Item*i)
+{
+    support.push(i);
+    dependencies.push(i);
+}
+
+Script::Script(Script_req* rq, int staflen)
+{    
     staffsize =staflen;
     specs_l_ = rq->scriptdef;
-    support= i;
-    stem_l_ = st_l;
+    stem_l_ = 0;
     pos = 0;
     symdir=1;
     dir =rq->dir;
@@ -37,6 +49,13 @@ Script::set_default_dir()
     }
 }
 
+Interval
+Script::support_height() const return r;
+{
+    for (int i=0; i < support.size(); i++)
+       r.unite(support[i]->height());
+}
+
 void
 Script::set_default_pos()
 {
@@ -46,12 +65,12 @@ Script::set_default_pos()
     int d = specs_l_->staffdir;
     Real y  ;
     if (!d) {
-       Interval v= support->height();
+       Interval v= support_height();
        y = v[dir]  -dy[-dir] + 2*dir*inter_f;
     } else {
        Real y  = (d > 0) ? staffsize + 2: -2; // ug
        y *=inter_f;
-       Interval v= support->height();
+       Interval v= support_height();
 
        if (d > 0) {
            y = y >? v.max();
index e4e4986ef1ecd5dd8f970a2c7d35fdf96c3d0879..20f291fa8aac52956675a8e81d2a89f0209276cb 100644 (file)
@@ -19,7 +19,7 @@ Simple_column::Simple_column(Score_column*s, Simple_staff *rs)
     staff_l_ = rs;
     beam_ = 0;
     text_=0;
-    lreq_p_ = 0;
+
 }
 
 Simple_staff::Simple_staff()
@@ -27,18 +27,10 @@ Simple_staff::Simple_staff()
     theline_l_ = 0;
 }
 
-/**
- accept:
-
-    BREAK: all
-    TYPESET: bar, meter,
-Scalar
-    */
-
 
 
 void
-Simple_column::process_requests()
+Simple_column::setup_requests()
 {
     for (int i = 0 ; i < v_elts.size(); i ++)
        for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) {
@@ -49,10 +41,10 @@ Simple_column::process_requests()
                }
            }
            if (rq->rhythmic()){
-               notes.add(rq->rhythmic());
+               notes.push(rq->rhythmic());
            }
            if (rq->script()) {
-               notes.last().scripts.add(rq->script());
+               notes.last().scripts.push(rq->script());
            }
            if (rq->stem()) {
                stem_ = rq->stem();
@@ -61,16 +53,11 @@ Simple_column::process_requests()
            if (rq->text()) {
                text_ = rq->text();
            }
-#if 0
-           if (rq->lreq_l()) {
-               lreq_p_ = rq->lreq_l();
-           }
-#endif
            if (rq->beam()) {
                beam_ = rq->beam();
            }
            if (rq->slur()) {
-               slurs.add(rq->slur());
+               slurs.push(rq->slur());
            }
        }
 }
@@ -85,7 +72,7 @@ void
 Simple_staff::walk()
 {
     for (Simple_walker sc(this); sc.ok(); sc++) {
-       sc.col()->process_requests();// TODO
+       sc.col()->setup_requests();// TODO
        sc.process();
     }
 }
index 8ac89bd2d0bc7e5e87f33f743a0abdd398e790a9..05bc76c9b6d6534b75cee1170efc5b7772bfa368 100644 (file)
 #include "slur.hh"
 #include "localkeyitem.hh"
 #include "textitem.hh"
-#include "lyricitem.hh"
+
 
 Rhythmic_grouping
 parse_grouping(Array<Scalar> a, Moment one_beat)
 {
     Array<int> r;
     for (int i= 0 ; i < a.size(); i++)
-       r.add(a[i]);
+       r.push(a[i]);
     Moment here =0.0;
 
     Array<Rhythmic_grouping*> children;
@@ -35,7 +35,7 @@ parse_grouping(Array<Scalar> a, Moment one_beat)
        
        Moment last = here;
        here += one_beat * r[i];
-       children.add(
+       children.push(
            new Rhythmic_grouping(MInterval(last, here), r[i] )
            );
     }
@@ -120,14 +120,14 @@ Simple_walker::do_TYPESET_command(Command*com)
 void
 Simple_walker::do_local_key(Note_req*n,Notehead* head_p)
 {
-    if ( local_key_.oct(n->octave).acc(n->name) != n->accidental) {
+    if ( local_key_.oct(n->octave).acc(n->notename) != n->accidental) {
        if (!local_key_item_) {
            local_key_item_ = staff()->get_local_key_item();
            local_key_item_->c0_position = clef_.c0_pos;
        }
-       
-       local_key_item_->add(n->octave, n->name, n->accidental, head_p);
-       local_key_.oct(n->octave).set(n->name, n->accidental);
+       local_key_item_->add(head_p);
+       local_key_item_->add(n->octave, n->notename, n->accidental);
+       local_key_.oct(n->octave).set(n->notename, n->accidental);
     }
 }
 
@@ -136,10 +136,10 @@ Simple_walker::do_note(Note_info n)
 {
     Simple_column*c = col();
     Simple_staff *s = staff();
-       Item*rhythmic=0;
+    Item*rhythmic=0;
     if (n.rq->note()) {
        Note_req * req = n.rq->note() ;
-       const Voice *v = req->elt_l_->voice_;
+       const Voice *v = req->elt_l_->voice_l_;
 
        Notehead*n = s->get_notehead(req, clef_.c0_pos);
        rhythmic=n;
@@ -150,7 +150,7 @@ Simple_walker::do_note(Note_info n)
            current_grouping->add_child(
                c->tdescription_->whole_in_measure, req->duration());
        }
-       noteheads.add(n);
+       noteheads.push(n);
        int sidx =find_slur(v);
        if (sidx >= 0) {
            pending_slurs[sidx]->add(n);
@@ -158,12 +158,16 @@ Simple_walker::do_note(Note_info n)
 
        if (wantkey)
            do_local_key(req,n);
-    }else if (n.rq->rest()) {
+    } else if (n.rq->rest()) {
        rhythmic = s->get_rest(n.rq->rest());
        c->typeset_item(rhythmic);
     }
-    for (int i= 0; i < n.scripts.size(); i ++)
-       c->typeset_item(new Script(n.scripts[i], rhythmic, 10, stem_)); // UGR
+    for (int i= 0; i < n.scripts.size(); i ++) {
+       Script * s_p =new Script(n.scripts[i], 10);
+       s_p->set_support(rhythmic);
+       s_p->set_stem(stem_);
+       c->typeset_item(s_p);   // UGR
+    }
 }
 
 void
@@ -172,7 +176,7 @@ Simple_walker::process_requests()
     Simple_column*c = col();
     Simple_staff *s = staff();
 
-    if (c->beam_&& c->beam_->spantype == Span_req::START) {
+    if (c->beam_ && c->beam_->spantype == Span_req::START) {
        if (beam_)
            error("Too many beams (t = "
                          +String(c->when())+")");
@@ -185,10 +189,10 @@ Simple_walker::process_requests()
        Slur_req*sl = c->slurs[i];
 
        if (sl->spantype == Span_req::START) {
-           if  (find_slur(sl->elt_l_->voice_ )>=0)
+           if  (find_slur(sl->elt_l_->voice_l_)>=0)
                error_t("Too many slurs in voice", *col()->tdescription_);
-           pending_slur_reqs.add(sl);
-           pending_slurs.add(new Slur);
+           pending_slur_reqs.push(sl);
+           pending_slurs.push(new Slur);
        }
     }
     
@@ -196,12 +200,8 @@ Simple_walker::process_requests()
        c->typeset_item(new Text_item(c->text_, 10)); // UGR
     }
 
-//    if (c->lreq_p_) {
-//     c->typeset_item(new Lyric_item(c->lreq_p_, 10)); // UGR
-//    }
-
     if (c->stem_) {
-       stem_ = s->get_stem(c->stem_->stem(), c->stem_requester_len);
+       stem_ = s->get_stem(c->stem_->stem());
     }
     
     for (int i = 0; i <  c->notes.size(); i ++)  {
@@ -224,15 +224,19 @@ Simple_walker::process_requests()
     }
 
     if (c->beam_&& c->beam_->spantype == Span_req::STOP) {
+       if (!beam_) {
+           error_t("No beam to end", *col()->tdescription_);
+       }
        default_grouping.extend(current_grouping->interval());
        beam_->set_grouping(default_grouping, *current_grouping);
-       pscore_->typeset_spanner(beam_, s->theline_l_);
+       pscore_l_->typeset_spanner(beam_, s->theline_l_);
 
        if (c->beam_->nplet) {
-           Text_spanner* t = new Text_spanner(beam_);
+           Text_spanner* t = new Text_spanner;
+           t->set_support(beam_);
            t->spec.align_i_ = 0;
            t->spec.text_str_ = c->beam_->nplet;
-           pscore_->typeset_spanner(t, s->theline_l_);
+           pscore_l_->typeset_spanner(t, s->theline_l_);
        }
 
        beam_ = 0;
@@ -245,7 +249,7 @@ Simple_walker::process_requests()
     noteheads.set_size(0);
  
     if (local_key_item_) {
-       c->typeset_item_directional(local_key_item_, -1);
+       c->typeset_item(local_key_item_);
        local_key_item_ = 0;    
     }
     if (stem_) {
@@ -255,11 +259,11 @@ Simple_walker::process_requests()
        Slur_req *sl = c->slurs[i];
 
        if (sl->spantype == Span_req::STOP) {
-           int idx = find_slur(sl->elt_l_->voice_);
+           int idx = find_slur(sl->elt_l_->voice_l_);
            if (idx < 0)
                error_t("can't find slur to end; ", *c->tdescription_);
            
-           pscore_->typeset_spanner(pending_slurs[idx],
+           pscore_l_->typeset_spanner(pending_slurs[idx],
                                     s->theline_l_);
            pending_slurs.del(idx);
            pending_slur_reqs.del(idx);
@@ -267,7 +271,28 @@ Simple_walker::process_requests()
     }
     
 }
+Simple_walker::Simple_walker(Simple_walker const&)
+    : Staff_walker(0, 0)
+{
+    assert(false);
+}
 
+Simple_walker::~Simple_walker()
+{
+    if (pending_slurs.size())
+       WARN << "destructing " << pending_slurs.size() << " Pending slurs ";
+    if (beam_)
+       WARN << "destructing Beam\n";
+    if (local_key_item_)
+       WARN<<"destructing Local_key_item\n";
+    if (stem_)
+       WARN<< "destructing Stem\n";
+    delete local_key_item_;
+    delete stem_;
+    delete beam_;    
+    
+}
+    
 Simple_walker::Simple_walker(Simple_staff*s)
     : Staff_walker(s, s->theline_l_->pscore_l_)
 {
@@ -279,7 +304,7 @@ Simple_walker::Simple_walker(Simple_staff*s)
     wantkey  =i;
     delete i;
     local_key_item_ = 0;
-    reset();
+    do_post_move();
 }
 
 
@@ -287,7 +312,7 @@ Simple_walker::Simple_walker(Simple_staff*s)
 Simple_staff*
 Simple_walker::staff()
 {
-    return (Simple_staff*) staff_;
+    return (Simple_staff*) staff_l_;
 }
 
 Simple_column*
@@ -297,7 +322,7 @@ Simple_walker::col()
 }
 
 void
-Simple_walker::reset()
+Simple_walker::do_post_move()
 {
     processed_clef =false;    
     processed_key = false;
@@ -308,7 +333,7 @@ int
 Simple_walker::find_slur(const Voice *v)
 {
     for (int i=0; i < pending_slur_reqs.size(); i++) {
-       if (pending_slur_reqs[i]->elt_l_->voice_ == v)
+       if (pending_slur_reqs[i]->elt_l_->voice_l_== v)
            return i;
     }
     return -1;
index d4a3d0d96df3b54a566b093bf175a31705e2eb7f..2cdddfec47b9071fb5b2a05bcb0c962d20ba71ad 100644 (file)
@@ -7,7 +7,7 @@
 #include "molecule.hh"
 #include "debug.hh"
 #include "boxes.hh"
-
+NAME_METHOD(Slur);
 Slur::Slur()
 {
     dir = 0;
@@ -30,8 +30,8 @@ Slur::center() const
 void
 Slur::add(Notehead*n)
 {
-    encompass.add(n);
-    dependencies.add(n);
+    encompass.push(n);
+    dependencies.push(n);
 }
 
 void
@@ -50,12 +50,6 @@ Slur::set_default_dir()
        dir = 1;    
 }
 
-void
-Slur::print()const
-{
-    mtor << "Slur.\n";   
-}
-
 void
 Slur::do_pre_processing()
 {
@@ -72,7 +66,7 @@ Slur::do_break_at(PCol*l, PCol*r) const
     ret->encompass.set_size(0);
     for (int i =0; i < encompass.size(); i++) {
        if (encompass[i]->pcol_l_->line_l_==l->line_l_)
-           ret->encompass.add(encompass[i]);
+           ret->encompass.push(encompass[i]);
     }
     if (right != r)
        ret->open_right = true;
index f6b4f92e80679aeaeebfd7ae06e11aeea6d78012..ce3cb4916250fb1c4bf5865686a96f80385cd76b 100644 (file)
@@ -2,6 +2,12 @@
 #include "spanner.hh"
 #include "pcol.hh"
 
+NAME_METHOD(Spanner);
+void
+Spanner::do_print()const
+{
+    mtor << " (unknown) ";
+}
 Spanner*
 Spanner::broken_at(PCol*c1, PCol *c2)const
 {
@@ -9,7 +15,7 @@ Spanner::broken_at(PCol*c1, PCol *c2)const
     Spanner *span_p = do_break_at(c1,c2);
 
     me_p->calc_children = true;
-    me_p->dependencies.add(span_p);
+    me_p->dependencies.push(span_p);
 
     span_p->calc_children = false; // should handle in ctor
 
@@ -28,20 +34,10 @@ Spanner::Spanner()
 Interval
 Spanner::width()const
 {
-    Real r =right->hpos,
-       l= left->hpos;
+    Real r = right->hpos;
+    Real l = left->hpos;
+    assert(*left < *right);
     assert(r>=l);
        
     return Interval(0, r-l);
 }
-
-void
-Spanner::print() const
-{
-#ifndef NPRINT
-    mtor << "Spanner { ";
-    Staff_elem::print();
-    mtor << "}\n";
-#endif
-}
-
index 69fc3123b8864edf418afbd947215667ea6f60d1..df46046c1458228e5bc89e5ab010c70b5dded317 100644 (file)
@@ -77,19 +77,19 @@ Staff::clean_cols()
 Staff_column *
 Staff::get_col(Moment w, bool mus)
 {
-    Score_column* sc = score_l_->find_col(w,mus);
+    Score_column* sccol_l = score_l_->find_col(w,mus);
     
     iter_top(cols,i);
     for (; i.ok(); i++) {
 
-       if (*i->score_column_l_ > *sc) // too far
+       if (*i->score_column_l_ > *sccol_l) // too far
            break;
-       if (sc == i->score_column_l_)
+       if (sccol_l == i->score_column_l_)
            return i;
     }
 
     /* post: *sc > *->score_column_l_ || !i.ok() */
-    Staff_column* newst = create_col(sc);
+    Staff_column* newst = create_col(sccol_l);
 
     if (!i.ok()) {
        cols.bottom().add(newst);
@@ -121,8 +121,8 @@ Staff::get_marks(Array<String>&s_arr, Array<Moment>&m_arr)
        for (iter_top(i->elts,j); j.ok(); j++) {
            for (iter_top(j->reqs, k); k.ok(); k++) {
                if (k->mark()) { // ugh. 4 levels
-                   s_arr.add(k->mark()->mark_str_);
-                   m_arr.add(now);
+                   s_arr.push(k->mark()->mark_str_);
+                   m_arr.push(now);
                }
            }
            now += j->duration;     
@@ -176,6 +176,15 @@ Staff::OK() const
 #ifndef NDEBUG
     cols.OK();
     voices.OK();
+    iter_top(cols, i);
+    iter_top(cols, j);
+    i++;
+    for (; i.ok(); j++,i++) {
+       if ( j->when() == i->when())
+           assert(!j->mus() && i->mus());
+       else
+           assert(j->when () < i->when() );
+    }
     assert(score_l_);
 #endif    
 }
index 82286bd7d64b4d6ab3da21f1f82fb700fbd638a2..d1bbc45c42812a7d87feb283cb7afd1aa1c09220 100644 (file)
@@ -156,14 +156,14 @@ Staff_commands_at::add(Command c)
            { /* every line a currentkey. */
                Command kc;
                kc.code =TYPESET;
-               kc.args.add( "CURRENTKEY");
+               kc.args.push( "CURRENTKEY");
                kc.priority = 60;
                add(kc);
            }
            { /* every line a currentclef. */
                Command kc;
                kc.code =TYPESET;
-               kc.args.add( "CURRENTCLEF");
+               kc.args.push( "CURRENTCLEF");
                kc.priority = 80;
                add(kc);
            }
index 9d070aa4cca57d21a414e06672b96f706ac55299..89a572408a621779b6b7be9eaeb80e2956238c3d 100644 (file)
@@ -35,7 +35,7 @@ Staff_column::add(Voice_element*ve)
        score_column_l_->add_duration(d);
     }
        
-    v_elts.add(ve);
+    v_elts.push(ve);
 }
 
 Staff_column::Staff_column(Score_column *s_l)
index 85c4c15e2bd5511791a5c0012bf00db84b82cf24..2e602c1cae78974d0352ddfa5daba5c9fc6c9e76 100644 (file)
@@ -9,10 +9,10 @@
 #include "misc.hh"
 
 const int STEMLEN=7;
-
-Stem::Stem(int c, Moment len)
+NAME_METHOD(Stem);
+Stem::Stem(int c) //, Moment len)
 {
-    note_length = len;
+//    note_length = len;
     beams_left = 0;
     beams_right = 0;
     minnote = 1000;            // invalid values
@@ -27,16 +27,11 @@ Stem::Stem(int c, Moment len)
 }
 
 void
-Stem::print() const
+Stem::do_print() const
 {
 #ifndef NPRINT
-    mtor << "{\n";
     mtor << "flag "<< flag << " print_flag " << print_flag
         << "min,max [" << minnote << ", " << maxnote << "]";
-       
-
-    Item::print();
-    mtor << "}\n";
 #endif
 }
 void
@@ -63,8 +58,8 @@ Stem::add(Notehead *n)
        minnote = p;
     if ( p> maxnote)
        maxnote = p;
-    heads.add(n);
-    n->dependencies.add(this);
+    heads.push(n);
+    n->dependencies.push(this);
 }
 
 
index 9a10c993ea023da5ff030dfd3dd93d6882e84cc3..1a5c4a08c57d7b815e327edc08216129834e7942 100644 (file)
@@ -36,7 +36,7 @@ substitute_args(String source, Array<Scalar> args)
 {
     Array<String> sv;
     for (int i = 0 ; i < args.size(); i++)
-       sv.add(args[i]);
+       sv.push(args[i]);
     
     return substitute_args(source, sv);
 }
index 86eac612cb08660b3c811d622d48385b0c15f47b..d4de8fb824465722b5c672a71952a54926ccfa57 100644 (file)
@@ -4,10 +4,23 @@
 #include "textdef.hh"
 #include "debug.hh"
 
-Text_spanner::Text_spanner(Directional_spanner*d)
+NAME_METHOD(Text_spanner);
+
+void
+Text_spanner::set_support(Directional_spanner*d)
 {
     support = d;
-    dependencies.add(d);
+    dependencies.push(d);
+}    
+Text_spanner::Text_spanner()
+{
+    support = 0;
+}
+
+void
+Text_spanner::do_print() const
+{
+    spec.print();
 }
 
 void
@@ -35,14 +48,6 @@ Text_spanner::brew_molecule_p() const
     return output;
 }
 
-void
-Text_spanner::print() const    // todo
-{
-#ifndef NDEBUG
-    mtor << "Text_spanner\n";
-#endif
-}
-
 void
 Text_spanner::do_pre_processing()
 {
@@ -60,5 +65,5 @@ Text_spanner::height()const
 Spanner*
 Text_spanner::do_break_at(PCol*c1, PCol*c2)const
 {
-    return new Text_spanner(*this);    
+    return new Text_spanner(*this); // todo
 }