X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fcatalogue.h;h=641b6f8b13c3ea15275a987cdd76a8eff71035f5;hb=48dff17ed3144d944965e7cb534e1f8fb92bd620;hp=5d88c28dcd0dac2543421bad27e6ced57da3e0ba;hpb=7e382cc3cad8c4f6945b0c9d89e2ca917b42b740;p=r2c2.git diff --git a/source/libmarklin/catalogue.h b/source/libmarklin/catalogue.h index 5d88c28..641b6f8 100644 --- a/source/libmarklin/catalogue.h +++ b/source/libmarklin/catalogue.h @@ -10,6 +10,7 @@ Distributed under the GPL #include #include +#include "layout.h" #include "profile.h" namespace Marklin { @@ -27,12 +28,16 @@ public: private: void ballast_profile(); void gauge(float); + void layout(); void locomotive(unsigned); void rail_profile(); void scale(float, float); void track(unsigned); }; + sigc::signal signal_track_added; + sigc::signal signal_loco_added; + private: float scale; float gauge; @@ -40,6 +45,7 @@ private: Profile ballast_profile; std::map tracks; std::map locos; + Layout layout; public: Catalogue(); @@ -49,10 +55,16 @@ public: float get_gauge() const { return gauge; } const Profile &get_rail_profile() const { return rail_profile; } const Profile &get_ballast_profile() const { return ballast_profile; } - TrackType &get_track(unsigned) const; + + void add_track(TrackType &); + const TrackType &get_track(unsigned) const; const std::map &get_tracks() const { return tracks; } - LocoType &get_locomotive(unsigned) const; + + void add_locomotive(LocoType &); + const LocoType &get_locomotive(unsigned) const; const std::map &get_locomotives() const { return locos; } + + Layout &get_layout() { return layout; } }; } // namespace Marklin