3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBMARKLIN_TRACKTYPE_H_
9 #define LIBMARKLIN_TRACKTYPE_H_
11 #include <msp/datafile/loader.h>
13 #include "trackpart.h"
20 class Loader: public Msp::DataFile::Loader
27 TrackType &get_object() { return ttype; }
29 virtual void finish();
32 void position(float, float, float);
37 std::string description;
38 std::vector<TrackPart> parts;
39 std::vector<Endpoint> endpoints;
44 unsigned get_article_number() const { return art_nr; }
45 const std::string &get_description() const { return description; }
46 float get_total_length() const;
47 float get_route_length(int) const;
48 unsigned get_n_routes() const;
49 const std::vector<TrackPart> &get_parts() const { return parts; }
50 const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
53 void collect_endpoints();
56 } // namespace Marklin