X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblock.h;h=6823b2730343faa69c03b14b0f507701ad26b85d;hb=ece91e92af821bd6b468bd1134302efb7c28f019;hp=558d425016ffe050a937ef47726536229b2b9eee;hpb=91385545a7d76784a17af421b0def49775be0d4c;p=r2c2.git diff --git a/source/libr2c2/block.h b/source/libr2c2/block.h index 558d425..6823b27 100644 --- a/source/libr2c2/block.h +++ b/source/libr2c2/block.h @@ -32,24 +32,29 @@ public: private: unsigned id; - unsigned sensor_id; - unsigned turnout_id; + unsigned sensor_addr; + unsigned turnout_addr; + bool conflict; TrackCircuit *sensor; std::vector endpoints; Train *train; + Train *pending_train; + bool emitting_reserve; public: Block(Layout &, Track &); ~Block(); + virtual void set_name(const std::string &); + private: virtual void on_track_added(Track &); virtual Validity check_validity(Track &) const; public: unsigned get_id() const { return id; } - unsigned get_sensor_id() const { return sensor_id; } - unsigned get_turnout_id() const { return turnout_id; } + unsigned get_sensor_address() const { return sensor_addr; } + unsigned get_turnout_address() const { return turnout_addr; } TrackCircuit *get_sensor() const { return sensor; } const std::vector &get_endpoints() const { return endpoints; } const Endpoint &get_endpoint(unsigned) const; @@ -62,6 +67,9 @@ public: Train *get_train() const { return train; } private: void determine_id(); + +public: + virtual Msp::DataFile::Statement save_reference() const; }; } // namespace R2C2