]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/timetable.h
Set correct Z coordinate to vehicle position
[r2c2.git] / source / libmarklin / timetable.h
index 6631f3822c734f2ff99c8a9b28b8e70fd01bc4b5..72e12d3d9980f5ca1a66732678c88abfd17cf20e 100644 (file)
@@ -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<Msp::Variant> params;
 
-               Row(RowType, int);
-               Row(RowType, const std::string &);
+               Row(RowType);
+
+               template<typename T>
+               Row(RowType, const T &);
+
+               template<typename T>
+               const T &get_param(unsigned) const;
 
                std::string str() const;
 
+               Msp::DataFile::Statement save() const;
+
                static Row parse(const std::string &);
        };
 
@@ -71,6 +81,7 @@ public:
 
        void set_enabled(bool);
        bool is_enabled() const { return enabled; }
+       void reset();
 
        void clear();
        void append(const Row &);