X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftimetable.h;fp=source%2Flibr2c2%2Ftimetable.h;h=1bf8f4fe6c0b000db6823edb1f699dc369010682;hb=d3a7a9e9ad694d52ccca8b6038501772fdc1dfd5;hp=96275c9bd65df85645beedbe9f3f72e6be95957e;hpb=26e741a3e8f1c83e717318f69ff02eed9b0ef6de;p=r2c2.git diff --git a/source/libr2c2/timetable.h b/source/libr2c2/timetable.h index 96275c9..1bf8f4f 100644 --- a/source/libr2c2/timetable.h +++ b/source/libr2c2/timetable.h @@ -12,7 +12,7 @@ Distributed under the GPL #include #include #include -#include +#include "trainai.h" namespace R2C2 { @@ -21,7 +21,7 @@ class Track; class Train; class Zone; -class Timetable: public sigc::trackable +class Timetable: public TrainAI, public sigc::trackable { public: class Loader: public Msp::DataFile::ObjectLoader @@ -36,6 +36,7 @@ public: void route(const std::string &); void reverse(); void speed(unsigned); + void tag(const std::string &); void travel_to(unsigned); void travel_past(unsigned); void wait(unsigned); @@ -79,7 +80,6 @@ public: }; private: - Train &train; bool enabled; std::vector rows; unsigned current_row; @@ -102,7 +102,7 @@ public: unsigned get_n_rows() const { return rows.size(); } const Row &get_row(unsigned) const; - void tick(const Msp::Time::TimeStamp &); + void tick(const Msp::Time::TimeStamp &, const Msp::Time::TimeDelta &); void save(std::list &) const; private: Track &get_sensor(unsigned);