X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftimetable.h;fp=source%2Flibmarklin%2Ftimetable.h;h=6631f3822c734f2ff99c8a9b28b8e70fd01bc4b5;hb=cf52013784607dc4d307bd1244c5346ee88336a4;hp=3c76055e712e6d54d82d29bff77b3511da4e0248;hpb=4d33c389881ebdf0b3926343d53e7d1ece654e20;p=r2c2.git diff --git a/source/libmarklin/timetable.h b/source/libmarklin/timetable.h index 3c76055..6631f38 100644 --- a/source/libmarklin/timetable.h +++ b/source/libmarklin/timetable.h @@ -51,10 +51,15 @@ public: Row(RowType, int); Row(RowType, const std::string &); + + std::string str() const; + + static Row parse(const std::string &); }; private: Train &train; + bool enabled; std::vector rows; unsigned current_row; bool executing; @@ -64,6 +69,15 @@ private: public: Timetable(Train &); + void set_enabled(bool); + bool is_enabled() const { return enabled; } + + void clear(); + void append(const Row &); + void insert(unsigned, const Row &); + unsigned get_n_rows() const { return rows.size(); } + const Row &get_row(unsigned) const; + void tick(const Msp::Time::TimeStamp &); void save(std::list &) const; private: