#ifndef REGISTER_HH
#define REGISTER_HH
#include "proto.hh"
-#include "sstack.hh"
+#include "varray.hh"
/// data container.
struct Staff_elem_info {
};
struct Slur_register : Request_register {
- sstack<Slur_req*> requests_arr_;
- sstack<Slur *> slur_l_stack_;
+ Array<Slur_req*> requests_arr_;
+ Array<Slur *> slur_l_stack_;
Array<Slur*> end_slur_l_arr_;
/****************/
for (iter_top(pscore_.cols,c); c.ok(); c++)
if (c->breakable())
retval.push(c);
- assert(retval.last() == pscore_.cols.bottom().ptr());
+ assert(retval.top() == pscore_.cols.bottom().ptr());
return retval;
}
sp.add_column(curline[0], true, 0.0);
for (int i=1; i< curline.size()-1; i++)
sp.add_column(curline[i]);
- sp.add_column(curline.last(), true, linelength);
+ sp.add_column(curline.top(), true, linelength);
// misschien moeven uit Spacing_problem?
for (iter_top(pscore_.suz,i); i.ok(); i++) {
Array<Real> the_sol=sp.solve();
Col_hpositions col_hpos;
col_hpos.cols = curline;
- col_hpos.energy = the_sol.last();
- the_sol.pop();
+ col_hpos.energy = the_sol.pop();
col_hpos.config = the_sol;
col_hpos.OK();
return col_hpos;
else
return
MInterval(children[0]->interval().left,
- children.last()->interval().right);
+ children.top()->interval().right);
}
void
Rhythmic_grouping::child_fit_query(Moment start)
{
if (children.size())
- return ( children.last()->interval().right== start);
+ return ( children.top()->interval().right== start);
return true;
}
Array<Rhythmic_grouping*> a(children);
for (int i=0; i < a.size(); i++) {
a[i] =new Rhythmic_grouping(*children[i]);
- a[i]->translate(children.last()->interval().right);
+ a[i]->translate(children.top()->interval().right);
}
children.concat(a);
}
current_iscore_l()
{
if ( score_array_global.size() )
- return score_array_global.last(); // UGH
+ return score_array_global.top(); // UGH
else
return 0;
}
Offset
Slur::center() const
{
- int pos1 = encompass.last()->position;
+ int pos1 = encompass.top()->position;
int pos2 = encompass[0]->position;
int dy = pos1-pos2;
void
Slur::do_pre_processing()
{
- right = encompass.last()->pcol_l_;
+ right = encompass.top()->pcol_l_;
left = encompass[0]->pcol_l_;
}
assert(encompass.size()>0); // todo
Notehead *lnote_p =encompass[0];
- Notehead *rnote_p =encompass.last();
+ Notehead *rnote_p =encompass.top();
int lpos_i = lnote_p->position;
int rpos_i = rnote_p->position;
Offset left_off(lnote_p->x_dir, lpos_i + 2*dir);
{
heads.sort(Notehead::compare);
heads[0]->extremal = -1;
- heads.last()->extremal = 1;
+ heads.top()->extremal = 1;
int parity=1;
int lastpos = heads[0]->position;
for (int i=1; i < heads.size(); i ++) {
// add nobreak version of breakable column
- current.cols.last()=breakpoints[break_idx_i];
+ current.cols.top()=breakpoints[break_idx_i];
curcol ++;
break_idx_i++;
}