#ifndef LIBR2C2_CLOCK_H_
#define LIBR2C2_CLOCK_H_
+#include <sigc++/signal.h>
+#include <msp/datafile/objectloader.h>
#include <msp/time/timedelta.h>
namespace R2C2 {
class Clock
{
+public:
+ class Loader: public Msp::DataFile::ObjectLoader<Clock>
+ {
+ public:
+ Loader(Clock &);
+
+ private:
+ void time(Msp::Time::RawTime);
+ };
+
+ sigc::signal<void> signal_minute;
+
private:
Msp::Time::TimeDelta current_time;
float rate;
+ bool stopped;
public:
Clock();
void set_rate(float);
+ float get_rate() const { return rate; }
+ void set_current_time(const Msp::Time::TimeDelta &);
const Msp::Time::TimeDelta &get_current_time() const { return current_time; }
+ void stop(bool);
+ bool is_stopped() const { return stopped; }
void tick(const Msp::Time::TimeDelta &);
+ void save(std::list<Msp::DataFile::Statement> &) const;
};
} // namespace R2C2