]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/time-description.hh
release: 0.0.47
[lilypond.git] / lily / include / time-description.hh
1 /*
2   moment.hh -- part of LilyPond
3
4   (c) 1996,97 Han-Wen Nienhuys
5 */
6
7 #ifndef tdes_HH
8 #define tdes_HH
9
10 #include "moment.hh"
11
12 /// full info on where we are
13 struct Time_description {
14     Moment when_;
15
16     /// if true, no bars needed, no reduction of whole_in_measure
17     bool cadenza_b_;
18     
19     /// current measure info
20     Moment whole_per_measure_;
21
22     /// where am i 
23     Moment whole_in_measure_;
24
25     /// how long is one beat?
26     Moment one_beat_;
27
28     /// idem
29     int bars_i_;
30
31     /* *************** */
32     void set_cadenza(bool);
33     void OK() const;
34     Time_description();
35     void add(Moment dt);
36     bool allow_meter_change_b();
37     String str()const;
38     void print() const;
39     void setpartial(Moment p);
40     String try_set_partial_str(Moment)const;
41     Moment barleft();
42     void set_meter(int,int);
43     static int compare (const Time_description&, const Time_description&);
44 };
45
46 #include "compare.hh"
47
48
49 instantiate_compare(Time_description&,Time_description::compare);
50
51 #endif // Time_description_HH
52