X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fcatalogue.h;h=524d3f2b56a6593cb82c859af044dfbf027838d9;hb=d3907f4b0e60f246a53201b93b06e86062f1b48a;hp=e531941b40fb6e1c072491f90094b2ae8164ce1a;hpb=c0c5a34d1056eabdebd350da3534e24c902c0dac;p=r2c2.git diff --git a/source/libmarklin/catalogue.h b/source/libmarklin/catalogue.h index e531941..524d3f2 100644 --- a/source/libmarklin/catalogue.h +++ b/source/libmarklin/catalogue.h @@ -17,6 +17,7 @@ namespace Marklin { class LocoType; class TrackType; +class VehicleType; class Catalogue { @@ -33,15 +34,20 @@ public: 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: @@ -52,10 +58,17 @@ 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; + 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 LocoType &get_locomotive(unsigned) const; + const std::map &get_vehicles() const { return vehicles; } + Layout &get_layout() { return layout; } };