X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fcatalogue.h;h=9a21c5ebadcc15c3e8f57b4257be9293af18891a;hb=25c26706d400228110e14a4a9a9765cb1298372d;hp=5d88c28dcd0dac2543421bad27e6ced57da3e0ba;hpb=7e382cc3cad8c4f6945b0c9d89e2ca917b42b740;p=r2c2.git diff --git a/source/libmarklin/catalogue.h b/source/libmarklin/catalogue.h index 5d88c28..9a21c5e 100644 --- a/source/libmarklin/catalogue.h +++ b/source/libmarklin/catalogue.h @@ -10,12 +10,13 @@ Distributed under the GPL #include #include +#include "layout.h" #include "profile.h" namespace Marklin { -class LocoType; class TrackType; +class VehicleType; class Catalogue { @@ -27,19 +28,25 @@ public: private: void ballast_profile(); void gauge(float); - void locomotive(unsigned); + void layout(); void rail_profile(); void scale(float, float); void track(unsigned); + void vehicle(unsigned); }; + sigc::signal signal_track_added; + sigc::signal signal_vehicle_added; + private: float scale; float gauge; Profile rail_profile; Profile ballast_profile; + Profile path_profile; std::map tracks; - std::map locos; + std::map vehicles; + Layout layout; public: Catalogue(); @@ -47,12 +54,20 @@ public: float get_scale() const { return scale; } float get_gauge() const { return gauge; } + float get_rail_elevation() const; const Profile &get_rail_profile() const { return rail_profile; } const Profile &get_ballast_profile() const { return ballast_profile; } - TrackType &get_track(unsigned) const; + const Profile &get_path_profile() const { return path_profile; } + + void add_track(TrackType &); + const TrackType &get_track(unsigned) const; const std::map &get_tracks() const { return tracks; } - LocoType &get_locomotive(unsigned) const; - const std::map &get_locomotives() const { return locos; } + + void add_vehicle(VehicleType &); + const VehicleType &get_vehicle(unsigned) const; + const std::map &get_vehicles() const { return vehicles; } + + Layout &get_layout() { return layout; } }; } // namespace Marklin