X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftimetable.h;h=72e12d3d9980f5ca1a66732678c88abfd17cf20e;hb=97443d96ff3ce51388d2edd1e0dca8f2cd231346;hp=ec4212e64c459da07895ed4c3958a9a6e67abcd0;hpb=e2ecc5a6e8e8056cd09599e60140498f322b87b6;p=r2c2.git diff --git a/source/libmarklin/timetable.h b/source/libmarklin/timetable.h index ec4212e..72e12d3 100644 --- a/source/libmarklin/timetable.h +++ b/source/libmarklin/timetable.h @@ -27,9 +27,11 @@ public: public: Loader(Timetable &); private: + void arrive(); void go_to(const std::string &); void route(const std::string &); - void speed(int); + void reverse(); + void speed(unsigned); void travel(const std::string &); void wait(unsigned); }; @@ -39,21 +41,29 @@ public: GOTO, TRAVEL, WAIT, + ARRIVE, SPEED, + REVERSE, ROUTE }; struct Row { RowType type; - int intparam; - std::string strparam; + std::vector params; - Row(RowType, int); - Row(RowType, const std::string &); + Row(RowType); + + template + Row(RowType, const T &); + + template + const T &get_param(unsigned) const; std::string str() const; + Msp::DataFile::Statement save() const; + static Row parse(const std::string &); };