/* $Id$
This file is part of the MSP Märklin suite
-Copyright © 2007-2009 Mikkosoft Productions, Mikko Rasa
+Copyright © 2007-2010 Mikkosoft Productions, Mikko Rasa
Distributed under the GPL
*/
#include <map>
#include <set>
#include <string>
+#include <sigc++/trackable.h>
#include <msp/datafile/loader.h>
namespace Marklin {
+class Layout;
class Track;
-class Turnout;
-class Route
+class Route: public sigc::trackable
{
public:
class Loader: public Msp::DataFile::BasicLoader<Route>
};
private:
+ Layout &layout;
std::string name;
std::set<const Track *> tracks;
std::map<unsigned, int> turnouts;
public:
- Route(const std::string &);
+ Route(Layout &, const std::string &);
+ ~Route();
const std::string &get_name() const { return name; }
int get_turnout(unsigned) const;
private:
void update_turnouts();
unsigned check_validity(const Track &) const;
+ void track_removed(Track &);
};
} // namespace Marklin