]> git.donarmstrong.com Git - lilypond.git/blob - src/stcol.cc
release: 0.0.26
[lilypond.git] / src / stcol.cc
1 #include "voice.hh"
2 #include "timedescription.hh"
3 #include "sccol.hh"
4 #include "staffcommands.hh"
5 #include "stcol.hh"
6
7 void
8 Staff_column::OK() const
9 {
10 #ifndef NDEBUG
11     if (tdescription_) {
12         assert(tdescription_->when == when());
13         assert(*tdescription_ == staff_commands_p_->tdescription_);
14     }
15 #endif
16 }
17
18 bool
19 Staff_column::mus() const
20 {
21     return score_column_l_->musical_;
22 }
23
24 Moment
25 Staff_column::when() const
26 {
27     return score_column_l_->when();
28 }
29
30 void
31 Staff_column::add(Voice_element*ve)
32 {
33     Moment d= ve->duration;
34     if (d){
35         score_column_l_->add_duration(d);
36     }
37         
38     v_elts.push(ve);
39 }
40
41 Staff_column::Staff_column(Score_column *s_l)
42 {
43     tdescription_ =0;
44     score_column_l_ = s_l;
45     staff_commands_p_ = 0;
46 }
47
48 Staff_column::~Staff_column()
49 {
50     delete tdescription_;
51 }