X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrain.h;h=e8785f5e5994deb4ae275e670a0187676dd03534;hb=378f04522aa762729c0d5651fb60ad7e4d8ba9f3;hp=ccfcbec1058f0dd6c12ab5409ad66415e4c27298;hpb=ed7a7139f4858fe5d0c756798538d25893bf58b2;p=r2c2.git diff --git a/source/libmarklin/train.h b/source/libmarklin/train.h index ccfcbec..e8785f5 100644 --- a/source/libmarklin/train.h +++ b/source/libmarklin/train.h @@ -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;