]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/time-description.hh
release: 0.1.62
[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   Moment when_mom () const { return when_; }
39   void OK() const;
40   Time_description();
41   void add (Moment dt);
42   bool allow_meter_change_b();
43   String str() const;
44   void print() const;
45   void setpartial (Moment p);
46   String try_set_partial_str (Moment) const;
47   Moment barleft() const;
48   Moment next_bar_moment() const;
49   void set_meter (int,int);
50   static int compare (const Time_description&, const Time_description&);
51 };
52
53 #include "compare.hh"
54
55
56 INSTANTIATE_COMPARE(Time_description&,Time_description::compare);
57
58
59 void
60 process_timing_reqs (Time_description &time_, 
61                      Rhythmic_grouping *default_grouping,
62                      Array<Timing_req*> const& timing_req_l_arr);
63 #endif // Time_description_HH
64