]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/train.h
Full vehicle unification
[r2c2.git] / source / libmarklin / train.h
index ccfcbec1058f0dd6c12ab5409ad66415e4c27298..e8785f5e5994deb4ae275e670a0187676dd03534 100644 (file)
@@ -16,10 +16,10 @@ Distributed under the GPL
 namespace Marklin {
 
 class ControlModel;
-class LocoType;
 class Route;
 class Timetable;
 class Vehicle;
+class VehicleType;
 
 class Train: public sigc::trackable
 {
@@ -28,6 +28,7 @@ public:
        {
        private:
                Block *prev_block;
+               bool blocks_valid;
 
        public:
                Loader(Train &);
@@ -68,7 +69,7 @@ private:
        };
 
        Layout &layout;
-       const LocoType &loco_type;
+       const VehicleType &loco_type;
        unsigned address;
        std::string name;
        int priority;
@@ -97,11 +98,11 @@ private:
        float overshoot_dist;
 
 public:
-       Train(Layout &, const LocoType &, unsigned);
+       Train(Layout &, const VehicleType &, unsigned);
        ~Train();
 
        Layout &get_layout() const { return layout; }
-       const LocoType &get_locomotive_type() const { return loco_type; }
+       const VehicleType &get_locomotive_type() const { return loco_type; }
        unsigned get_address() const { return address; }
        void set_name(const std::string &);
        const std::string &get_name() const { return name; }
@@ -109,6 +110,9 @@ public:
        int get_priority() const { return priority; }
        ControlModel &get_control() const { return *control; }
 
+       void add_vehicle(const VehicleType &);
+       void remove_vehicle(unsigned);
+       unsigned get_n_vehicles() const;
        Vehicle &get_vehicle(unsigned);
        const Vehicle &get_vehicle(unsigned) const;