X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Froute.h;h=89788e3b62b477fc945229a96f4e1ede0ecbfc7f;hb=e5cd9e4fbc577036a0385c985b6b65df8218d0a2;hp=6e69bba955aa3c24b8705e7370b5d230d04bd186;hpb=444c7efb2fadb10e98197a62b791829d821370c0;p=r2c2.git diff --git a/source/libmarklin/route.h b/source/libmarklin/route.h index 6e69bba..89788e3 100644 --- a/source/libmarklin/route.h +++ b/source/libmarklin/route.h @@ -1,7 +1,7 @@ /* $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 */ @@ -11,14 +11,15 @@ Distributed under the GPL #include #include #include +#include #include namespace Marklin { +class Layout; class Track; -class Turnout; -class Route +class Route: public sigc::trackable { public: class Loader: public Msp::DataFile::BasicLoader @@ -30,12 +31,14 @@ public: }; private: + Layout &layout; std::string name; std::set tracks; std::map 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; @@ -47,6 +50,11 @@ public: private: void update_turnouts(); unsigned check_validity(const Track &) const; + void track_removed(Track &); + +public: + static Route *find(const Track &, unsigned, const Track &); + static Route *find(const Track &, unsigned, const Route &); }; } // namespace Marklin