]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/blockallocator.h
Don't reset router to free run mode until allocator has deactivated
[r2c2.git] / source / libr2c2 / blockallocator.h
index 6ad3891bc4e68fc91b84ba0cb695ffc5aecd239b..95cb9108098d078dd70636c1a904a9c03f0814e9 100644 (file)
@@ -36,9 +36,11 @@ private:
        bool active;
        BlockList blocks;
        BlockList::iterator cur_blocks_end;
+       Sensor *next_sensor;
        Block *pending_block;
        const Block *stop_at_block;
        bool reserving;
+       bool advancing;
 
 public:
        BlockAllocator(Train &);
@@ -63,6 +65,7 @@ public:
 private:
        void reserve_more();
        bool reserve_block(const BlockIter &);
+       void advance_to(const Block *);
        void release_blocks_begin(const BlockList::iterator &);
        void release_blocks_end(const BlockList::iterator &);
        void release_block(const BlockList::iterator &);
@@ -74,6 +77,7 @@ private:
        void turnout_path_changed(Track &);
        void block_reserved(Block &, const Train *);
        void sensor_state_changed(Sensor &, Sensor::State);
+       void update_next_sensor(Sensor *);
 
 public:
        void save(std::list<Msp::DataFile::Statement> &) const;