3 This file is part of the MSP Märklin suite
4 Copyright © 2007-2009 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBMARKLIN_ROUTE_H_
9 #define LIBMARKLIN_ROUTE_H_
14 #include <msp/datafile/loader.h>
25 class Loader: public Msp::DataFile::BasicLoader<Route>
30 void turnout(unsigned, unsigned);
35 std::set<const Track *> tracks;
36 std::map<unsigned, int> turnouts;
39 Route(Layout &, const std::string &);
41 const std::string &get_name() const { return name; }
42 int get_turnout(unsigned) const;
43 const std::map<unsigned, int> &get_turnouts() const { return turnouts; }
44 void add_track(const Track &);
45 void add_tracks(const std::set<const Track *> &);
46 const std::set<const Track *> &get_tracks() const { return tracks; }
47 void save(std::list<Msp::DataFile::Statement> &) const;
49 void update_turnouts();
50 unsigned check_validity(const Track &) const;
51 void track_removed(Track &);
54 } // namespace Marklin