]> git.donarmstrong.com Git - lilypond.git/blob - src/complexstaff.cc
release: 0.0.26
[lilypond.git] / src / complexstaff.cc
1 #include "request.hh"
2 #include "voice.hh"
3 #include "staffwalker.hh"
4 #include "debug.hh"
5 #include "clef.hh"
6 #include "staff.hh"
7 #include "command.hh"
8 #include "complexstaff.hh"
9 #include "sccol.hh" 
10 #include "complexwalker.hh"
11
12
13
14 Complex_column::Complex_column(Score_column*s, Complex_staff *rs)
15     : Staff_column(s)
16 {
17     staff_l_ = rs;
18 }
19
20 Complex_staff::Complex_staff()
21 {
22     theline_l_ = 0;
23 }
24
25 void
26 Complex_column::setup_requests()
27 {
28     for (int i = 0 ; i < v_elts.size(); i ++)
29         for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) {            
30
31             if (j->barcheck()) {
32                 if (tdescription_->whole_in_measure) {
33                     error("Barcheck failed, " + tdescription_->str());
34                 }
35                 continue;
36             }
37             if (j->mark())
38                 continue;
39             if (j->command())
40                 continue;
41             todo_l_arr_.push(j);
42         }
43 }
44
45 Staff_column*
46 Complex_staff::create_col(Score_column*s)
47 {
48     return new Complex_column(s,this);
49 }
50
51 void
52 Complex_staff::walk()
53 {
54     for (Complex_walker sc(this); sc.ok(); sc++) {
55         sc.col()->setup_requests();// TODO
56         sc.process();
57     }
58 }