X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblock.h;h=558d425016ffe050a937ef47726536229b2b9eee;hb=f730acd5fa2b4f0d0185770ff7950ab814aec47c;hp=7d6211b0a5b303b9e85669fb96d72882606c838d;hpb=73edcbd8841752a2722fc8b3927fee2abbbba750;p=r2c2.git diff --git a/source/libr2c2/block.h b/source/libr2c2/block.h index 7d6211b..558d425 100644 --- a/source/libr2c2/block.h +++ b/source/libr2c2/block.h @@ -22,7 +22,6 @@ public: Track *track; unsigned track_ep; Block *link; - unsigned paths; Endpoint(Track *, unsigned); @@ -44,13 +43,14 @@ public: ~Block(); 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; } - TrackCircuit &get_sensor() const { return *sensor; } + TrackCircuit *get_sensor() const { return sensor; } const std::vector &get_endpoints() const { return endpoints; } const Endpoint &get_endpoint(unsigned) const; int get_endpoint_by_link(Block &) const; @@ -61,7 +61,6 @@ public: bool reserve(Train *); Train *get_train() const { return train; } private: - void find_paths(const TrackIter &, unsigned); void determine_id(); };