X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Flayout.h;h=5a0804fc77329b1c8714b3ce2d27112d1ff14b13;hb=399b48a7a80dafde49e7530ff8dfd2820232a73f;hp=887b2d189f453dcc2dab13e59316f0642ce54df5;hpb=b3f8467442aac111e9a316db0dda67d37ae240b8;p=r2c2.git diff --git a/source/libr2c2/layout.h b/source/libr2c2/layout.h index 887b2d1..5a0804f 100644 --- a/source/libr2c2/layout.h +++ b/source/libr2c2/layout.h @@ -1,6 +1,7 @@ #ifndef LIBR2C2_LAYOUT_H_ #define LIBR2C2_LAYOUT_H_ +#include #include #include #include @@ -67,6 +68,14 @@ private: void del(); }; + struct BlockReservation + { + Block █ + Train *train; + + BlockReservation(Block &, Train *); + }; + public: typedef std::vector ZoneArray; @@ -91,6 +100,8 @@ private: std::map trains; Msp::Time::TimeStamp last_tick; unsigned next_turnout_addr; + bool emitting_block_reserved; + std::deque block_reserve_queue; public: Layout(Catalogue &, Driver * = 0); @@ -145,6 +156,7 @@ public: void save_dynamic(const std::string &) const; private: void sensor_state_changed(Sensor &, Sensor::State); + void block_reserved(Block &, Train *); }; } // namespace R2C2