X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftimetable.h;fp=source%2Flibmarklin%2Ftimetable.h;h=72e12d3d9980f5ca1a66732678c88abfd17cf20e;hb=42398f0178d499bb013ccc08f0c29f69f6f1ad2d;hp=3abbf83149e87e256bb9852a1c146a49c833c629;hpb=cf643875a0aec0864901cd12795495bb8c6a5d75;p=r2c2.git diff --git a/source/libmarklin/timetable.h b/source/libmarklin/timetable.h index 3abbf83..72e12d3 100644 --- a/source/libmarklin/timetable.h +++ b/source/libmarklin/timetable.h @@ -30,7 +30,8 @@ public: 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); }; @@ -42,20 +43,27 @@ public: 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 &); };