lilypond-0.0.32
[lilypond.git] / src / stcol.cc
blobf3498db0e181d7a9e303ad003cab35cd7a2d1085
1 /*
2 stcol.cc -- implement Staff_column
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "voice.hh"
10 #include "timedescription.hh"
11 #include "sccol.hh"
12 #include "stcol.hh"
13 #include "commandrequest.hh"
14 #include "musicalrequest.hh"
16 void
17 Staff_column::OK() const
19 #ifndef NDEBUG
20 assert (command_column_l_->when() == musical_column_l_->when());
21 #endif
24 Moment
25 Staff_column::when() const
27 return (command_column_l_)?
28 command_column_l_->when():
29 musical_column_l_->when();
32 void
33 Staff_column::add(Voice_element*ve)
35 for (iter_top(ve->reqs,j); j.ok(); j++) {
36 if (j->nonmus()) {
37 if (j->nonmus()->timing()) {
38 timing_req_l_arr_.push(j->nonmus()->timing());
40 if (!j->barcheck() && !j->nonmus()->measuregrouping())
41 setup_one_request(j); // no need to bother children
42 } else {
43 if (j->rhythmic()) {
44 musical_column_l_->add_duration(j->rhythmic()->duration());
46 setup_one_request(j);
51 Staff_column::Staff_column()
53 musical_column_l_ = 0;
54 command_column_l_ = 0;
60 Staff_column::~Staff_column()
64 void
65 Staff_column::set_cols(Score_column*c1, Score_column*c2)
67 command_column_l_ = c1;
68 musical_column_l_ = c2;