2 sccol.cc -- implement Score_column
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
14 Score_column::compare(Score_column
& c1
, Score_column
&c2
)
16 return sign(c1
.when_
- c2
.when_
);
20 Score_column::set_breakable()
22 pcol_l_
->set_breakable();
25 Score_column::Score_column(Moment w
)
28 pcol_l_
= new PCol(0);
33 Score_column::used_b() {
34 return pcol_l_
->used_b();
38 Score_column::print() const
41 mtor
<< "Score_column { mus "<< musical_b_
<<" at " << when_
<<'\n';
42 mtor
<< "durations: [";
43 for (int i
=0; i
< durations
.size(); i
++)
44 mtor
<< durations
[i
] << " ";
52 Moment_compare(Moment
&a
, Moment
& b
)
58 Score_column::preprocess()
60 durations
.sort(Moment_compare
);
63 Score_column::add_duration(Moment d
)
66 for (int i
= 0; i
< durations
.size(); i
++) {
67 if (d
== durations
[i
])
74 Score_column::breakable_b()
76 return pcol_l_
->breakable_b();