]> git.donarmstrong.com Git - lilypond.git/blob - hdr/sccol.hh
release: 0.0.34
[lilypond.git] / hdr / sccol.hh
1 /*
2   sccol.hh -- part of LilyPond
3
4   (c) 1996,97 Han-Wen Nienhuys
5 */
6
7 #ifndef SCCOL_HH
8 #define SCCOL_HH
9 #include "proto.hh"
10 #include "varray.hh"
11 #include "moment.hh"
12
13
14 /**
15
16     When typesetting hasn't started on PScore yet, the columns which
17     contain data have a rhythmical position. Score_column is the type
18     with a rhythmical time attached to it. The calculation of
19     idealspacing is done with data in these columns. (notably: the
20     #durations# field)
21
22     */
23
24 class Score_column {
25     friend class Score;
26     friend class Score_walker;
27
28     bool musical_b_;
29     Moment when_;
30     void set_breakable();
31 public:
32     /// indirection to column
33     PCol * pcol_l_;
34
35     /// length of notes/rests in this column
36     Array<Moment> durations;
37     
38     /* *************** */
39
40     Moment when() {  return when_; }
41     Score_column(Moment when);       
42     static int compare(Score_column & c1, Score_column &c2);
43     void add_duration(Moment );
44     void preprocess();
45     bool breakable_b();
46     bool musical_b() { return musical_b_; }
47     bool used_b();
48     void print() const;
49
50
51 };
52
53 instantiate_compare(Score_column&, Score_column::compare);
54
55 #endif // SCCOL_HH
56
57
58
59