X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblockallocator.h;h=3c974f21975b06933317eb4c068ae408ae4fce80;hb=1251ba0141983481181d8260523ff07f2cf200a0;hp=c90b450bb52f11248ce1f8d016a0e73163e5b0a0;hpb=dda1e6c8716b6ac70d63a3f6ff95474a8b8b7336;p=r2c2.git diff --git a/source/libr2c2/blockallocator.h b/source/libr2c2/blockallocator.h index c90b450..3c974f2 100644 --- a/source/libr2c2/blockallocator.h +++ b/source/libr2c2/blockallocator.h @@ -3,8 +3,8 @@ #include #include -#include "block.h" #include "blockiter.h" +#include "sensor.h" namespace R2C2 { @@ -28,6 +28,8 @@ public: }; private: + struct BlockMatch; + typedef std::list BlockList; Train &train; @@ -52,15 +54,11 @@ public: bool has_block(const Block &) const; bool is_block_current(const Block &) const; -private: - BlockList::const_iterator find_block(const BlockList::const_iterator &, const BlockList::const_iterator &, const Block &) const; -public: void reserve_more(); private: bool reserve_block(const BlockIter &); public: - void release_until(const Block &); bool release_from(const Block &); void release_noncurrent(); private: @@ -73,7 +71,7 @@ public: private: void turnout_path_changed(Track &); void block_reserved(Block &, const Train *); - void block_state_changed(Block &, Block::State); + void sensor_state_changed(Sensor &, Sensor::State); public: void save(std::list &) const;