X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftimetable.h;h=ea3ff0b45e78aa79fd91bced272ec0498d73cbe6;hb=b3988eb3c4dcb52f99596ed53ce94473219a0940;hp=9cfda68df5df05a2876e920169efafe6debf85fd;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/libr2c2/timetable.h b/source/libr2c2/timetable.h index 9cfda68..ea3ff0b 100644 --- a/source/libr2c2/timetable.h +++ b/source/libr2c2/timetable.h @@ -17,7 +17,9 @@ Distributed under the GPL namespace R2C2 { class Block; +class Track; class Train; +class Zone; class Timetable: public sigc::trackable { @@ -28,20 +30,25 @@ public: Loader(Timetable &); private: void arrive(); - void go_to(const std::string &); + void goto_sensor(unsigned); + void goto_sensor(const std::string &); + void goto_zone(const std::string &); void route(const std::string &); void reverse(); void speed(unsigned); void travel(const std::string &); void wait(unsigned); - void wait_train(unsigned, const std::string &); + void wait_train(unsigned, unsigned); + void wait_until(unsigned, unsigned); }; enum RowType { - GOTO, + GOTO_SENSOR, + GOTO_ZONE, TRAVEL, WAIT_TIME, + WAIT_UNTIL, WAIT_TRAIN, ARRIVE, SPEED, @@ -95,7 +102,8 @@ public: void tick(const Msp::Time::TimeStamp &); void save(std::list &) const; private: - Block &parse_location(const std::string &); + Track &get_sensor(unsigned); + Zone &get_zone(const std::string &); void sensor_event(unsigned, bool); void train_arrived(); };