+/* $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_
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);
};
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<Msp::DataFile::Statement> &) const;
private:
// Direct copying not allowed due to links. See the copy() function.