]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/catalogue.h
Add locomotive types
[r2c2.git] / source / libmarklin / catalogue.h
index 66e34667e2f161bfba4c90b42d55150062b78f8f..4179ea75aa339ceedb781d147d3338a33b152b52 100644 (file)
@@ -6,6 +6,7 @@
 
 namespace Marklin {
 
+class LocoType;
 class TrackType;
 
 class Catalogue
@@ -18,17 +19,21 @@ public:
        private:
                Catalogue &cat;
 
+               void locomotive(unsigned);
                void track(unsigned);
        };
 
 private:
        std::map<unsigned, TrackType *> tracks;
+       std::map<unsigned, LocoType *> locos;
 
 public:
        ~Catalogue();
 
-       TrackType &get_track(unsigned);
+       TrackType &get_track(unsigned) const;
        const std::map<unsigned, TrackType *> &get_tracks() const { return tracks; }
+       LocoType &get_locomotive(unsigned) const;
+       const std::map<unsigned, LocoType *> &get_locomotives() const { return locos; }
        void  load(const std::string &);
 };