X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftimetable.h;h=86b4ae2944c8e21ebb207d49e27e54a946d62dbf;hb=7e27b311e33beda1746eb63e0945633f262427f6;hp=9cfda68df5df05a2876e920169efafe6debf85fd;hpb=2abb7008a1e2b93b77742693becf6fe0b8567d6e;p=r2c2.git diff --git a/source/libr2c2/timetable.h b/source/libr2c2/timetable.h index 9cfda68..86b4ae2 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,18 +30,21 @@ 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); }; enum RowType { - GOTO, + GOTO_SENSOR, + GOTO_ZONE, TRAVEL, WAIT_TIME, WAIT_TRAIN, @@ -95,7 +100,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(); };