X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrack.h;h=3c96a82d2cec51f6463c3e958d1b417c3ebb003a;hb=3df8cb5c78fbb0b919bcb79677c6c788b8028482;hp=13a98bf51b268d4772dff9d1c7111df54fbea967;hpb=52cbe8d99669f843f8f75c51128e2748584dd03a;p=r2c2.git diff --git a/source/libmarklin/track.h b/source/libmarklin/track.h index 13a98bf..3c96a82 100644 --- a/source/libmarklin/track.h +++ b/source/libmarklin/track.h @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef LIBMARKLIN_TRACK_H_ #define LIBMARKLIN_TRACK_H_ @@ -13,14 +20,10 @@ class TrackType; class Track { public: - class Loader: public Msp::DataFile::Loader + class Loader: public Msp::DataFile::BasicLoader { - private: - Track &track; - public: Loader(Track &); - Track &get_object() { return track; } private: void position(float, float, float); }; @@ -63,12 +66,15 @@ public: Track *get_link(unsigned) const; void check_slope(); int traverse(unsigned, unsigned) const; + Point get_point(unsigned, unsigned, float) const; /** Creates a copy of the track. The new track will be almost identical, but won't have any links to other tracks, nor a turnout or sensor id. */ Track *copy() const; + + void save(std::list &) const; private: // Direct copying not allowed due to links. See the copy() function.