X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fcatalogue.h;h=a436994ecea6ae700268bd878d8c4a25135831be;hb=8e3009751ee81e0e5312cae53ee844bdd9e49628;hp=61a336f5f6c2e7441f6cb05cd38aa934b54e8734;hpb=e5cd9e4fbc577036a0385c985b6b65df8218d0a2;p=r2c2.git diff --git a/source/libmarklin/catalogue.h b/source/libmarklin/catalogue.h index 61a336f..a436994 100644 --- a/source/libmarklin/catalogue.h +++ b/source/libmarklin/catalogue.h @@ -10,12 +10,12 @@ Distributed under the GPL #include #include +#include "articlenumber.h" #include "layout.h" #include "profile.h" namespace Marklin { -class LocoType; class TrackType; class VehicleType; @@ -30,14 +30,19 @@ public: void ballast_profile(); void gauge(float); void layout(); - void locomotive(unsigned); void rail_profile(); void scale(float, float); void track(unsigned); + void track(ArticleNumber); + void vehicle(unsigned); + void vehicle(ArticleNumber); }; + typedef std::map TrackMap; + typedef std::map VehicleMap; + sigc::signal signal_track_added; - sigc::signal signal_loco_added; + sigc::signal signal_vehicle_added; private: float scale; @@ -45,8 +50,8 @@ private: Profile rail_profile; Profile ballast_profile; Profile path_profile; - std::map tracks; - std::map locos; + TrackMap tracks; + VehicleMap vehicles; Layout layout; public: @@ -55,17 +60,18 @@ 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; } 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; } + const TrackType &get_track(const ArticleNumber &) const; + const TrackMap &get_tracks() const { return tracks; } - void add_locomotive(LocoType &); - const LocoType &get_locomotive(unsigned) const; - const std::map &get_locomotives() const { return locos; } + void add_vehicle(VehicleType &); + const VehicleType &get_vehicle(const ArticleNumber &) const; + const VehicleMap &get_vehicles() const { return vehicles; } Layout &get_layout() { return layout; } };