]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/track.h
Add state loading and saving to engineer
[r2c2.git] / source / libmarklin / track.h
index 11c9fb3c332cc127e3392a39691de16d2d4af9ab..3c96a82d2cec51f6463c3e958d1b417c3ebb003a 100644 (file)
@@ -20,14 +20,10 @@ class TrackType;
 class Track
 {
 public:
-       class Loader: public Msp::DataFile::Loader
+       class Loader: public Msp::DataFile::BasicLoader<Track>
        {
-       private:
-               Track &track;
-
        public:
                Loader(Track &);
-               Track &get_object() { return track; }
        private:
                void position(float, float, float);
        };
@@ -77,6 +73,8 @@ public:
        won't have any links to other tracks, nor a turnout or sensor id.
        */
        Track *copy() const;
+
+       void save(std::list<Msp::DataFile::Statement> &) const;
 private:
 
        // Direct copying not allowed due to links.  See the copy() function.