#define tdes_HH
#include "moment.hh"
+#include "lily-proto.hh"
+#include "varray.hh"
/// full info on where we are
struct Time_description {
Moment when_;
+ /// found an error so far?
+ bool error_b_ ;
+
/// if true, no bars needed, no reduction of whole_in_measure
bool cadenza_b_;
void print() const;
void setpartial(Moment p);
String try_set_partial_str(Moment)const;
- Moment barleft();
+ Moment barleft()const;
+ Moment next_bar_moment()const;
void set_meter(int,int);
static int compare (const Time_description&, const Time_description&);
};
instantiate_compare(Time_description&,Time_description::compare);
+
+void
+process_timing_reqs(Time_description &time_,
+ Rhythmic_grouping *default_grouping,
+ Array<Timing_req*> const& timing_req_l_arr);
#endif // Time_description_HH
b |= command_column_l_->used_b();
return b;
}
+void
+Request_column::update_time(int idx, Time_description&t)
+{
+ staff_col_l_arr_[idx]->update_time(t, 0);
+}
Time_description::Time_description()
{
+ error_b_ = false;
whole_per_measure_ = 1;
whole_in_measure_ =0;
one_beat_ = Moment(1,4);
}
Moment
-Time_description::barleft()
+Time_description::barleft()const
{
assert(!cadenza_b_);
return whole_per_measure_-whole_in_measure_;
return i;
}
+
+Moment
+Time_description::next_bar_moment() const
+{
+ return when_ + barleft();
+}
+