]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/catalogue.h
Add vehicles
[r2c2.git] / source / libmarklin / catalogue.h
index e531941b40fb6e1c072491f90094b2ae8164ce1a..61a336f5f6c2e7441f6cb05cd38aa934b54e8734 100644 (file)
@@ -17,6 +17,7 @@ namespace Marklin {
 
 class LocoType;
 class TrackType;
+class VehicleType;
 
 class Catalogue
 {
@@ -35,11 +36,15 @@ public:
                void track(unsigned);
        };
 
+       sigc::signal<void, const TrackType &> signal_track_added;
+       sigc::signal<void, const LocoType &> signal_loco_added;
+
 private:
        float scale;
        float gauge;
        Profile rail_profile;
        Profile ballast_profile;
+       Profile path_profile;
        std::map<unsigned, TrackType *> tracks;
        std::map<unsigned, LocoType *> locos;
        Layout layout;
@@ -52,10 +57,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;
+       const Profile &get_path_profile() const { return path_profile; }
+
+       void add_track(TrackType &);
+       const TrackType &get_track(unsigned) const;
        const std::map<unsigned, TrackType *> &get_tracks() const { return tracks; }
-       LocoType &get_locomotive(unsigned) const;
+
+       void add_locomotive(LocoType &);
+       const LocoType &get_locomotive(unsigned) const;
        const std::map<unsigned, LocoType *> &get_locomotives() const { return locos; }
+
        Layout &get_layout() { return layout; }
 };