+typedef std::list<MetricSection*> Metrics;
+
+/** Helper class that we use to be able to keep track of which
+ meter *AND* tempo are in effect at a given point in time.
+*/
+class TempoMetric {
+ public:
+ TempoMetric (const Meter& m, const Tempo& t) : _meter (&m), _tempo (&t), _frame (0) {}
+
+ void set_tempo (const Tempo& t) { _tempo = &t; }
+ void set_meter (const Meter& m) { _meter = &m; }
+ void set_frame (framepos_t f) { _frame = f; }
+ void set_start (const Timecode::BBT_Time& t) { _start = t; }
+
+ const Meter& meter() const { return *_meter; }
+ const Tempo& tempo() const { return *_tempo; }
+ framepos_t frame() const { return _frame; }
+ const Timecode::BBT_Time& start() const { return _start; }
+
+ private:
+ const Meter* _meter;
+ const Tempo* _tempo;
+ framepos_t _frame;
+ Timecode::BBT_Time _start;
+};