]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/time-description.hh
release: 0.1.11
[lilypond.git] / lily / include / time-description.hh
1 /*
2   moment.hh -- part of GNU 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 #include "lily-proto.hh"
12 #include "varray.hh"
13
14 /// full info on where we are
15 struct Time_description {
16     Moment when_;
17
18     /// found an error so far?
19     bool error_b_ ;
20
21     /// if true, no bars needed, no reduction of whole_in_measure
22     bool cadenza_b_;
23     
24     /// current measure info
25     Moment whole_per_measure_;
26
27     /// where am i 
28     Moment whole_in_measure_;
29
30     /// how long is one beat?
31     Moment one_beat_;
32
33     /// idem
34     int bars_i_;
35
36     /* *************** */
37     void set_cadenza (bool);
38     void OK() const;
39     Time_description();
40     void add (Moment dt);
41     bool allow_meter_change_b();
42     String str() const;
43     void print() const;
44     void setpartial (Moment p);
45     String try_set_partial_str (Moment) const;
46     Moment barleft() const;
47     Moment next_bar_moment() const;
48     void set_meter (int,int);
49     static int compare (const Time_description&, const Time_description&);
50 };
51
52 #include "compare.hh"
53
54
55 INSTANTIATE_COMPARE(Time_description&,Time_description::compare);
56
57
58 void
59 process_timing_reqs (Time_description &time_, 
60                     Rhythmic_grouping *default_grouping,
61                     Array<Timing_req*> const& timing_req_l_arr);
62 #endif // Time_description_HH
63