]> git.donarmstrong.com Git - lilypond.git/blob - hdr/sccol.hh
1d2f4022bbb9bd90de0ab062be548ded4a5042e3
[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 struct Score_column {
25
26     /// indirection to column
27     PCol * pcol_l_;
28
29     /// length of notes/rests in this column
30     Array<Moment> durations;
31     
32
33     bool musical_;
34     
35     /* *************** */
36     Moment when() {  return when_; }
37     Score_column(Moment when);       
38     static int compare(Score_column & c1, Score_column &c2);
39     void add_duration(Moment );
40     void preprocess();
41     void set_breakable();
42     bool used();
43     void print() const;
44
45 private:
46     Moment when_;
47 };
48
49 instantiate_compare(Score_column&, Score_column::compare);
50
51 #endif // SCCOL_HH
52
53
54
55