X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblockallocator.h;h=3c974f21975b06933317eb4c068ae408ae4fce80;hb=457e55c807755eae456633812ff3f3be888e97d5;hp=39a327b9fa95810030267952a174cbd2073ffb02;hpb=5c1ddd2f213af3fea15237e02f7da112c0abba36;p=r2c2.git diff --git a/source/libr2c2/blockallocator.h b/source/libr2c2/blockallocator.h index 39a327b..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,10 +54,7 @@ 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 &); @@ -72,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;