X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.h;h=e3eebe1fc5d050d2d3b2a230eaa332416c909a1f;hb=d2dfed1a38c5e8487532e9055fad464cf54efd83;hp=6b384f8220b9eece5e5873ead9ab07283d601755;hpb=54392d65e2053d1eacb4cfcc435f1013993f2973;p=r2c2.git diff --git a/source/libr2c2/train.h b/source/libr2c2/train.h index 6b384f8..e3eebe1 100644 --- a/source/libr2c2/train.h +++ b/source/libr2c2/train.h @@ -5,14 +5,15 @@ #include #include #include -#include "block.h" #include "blockallocator.h" #include "controller.h" +#include "sensor.h" #include "trainai.h" namespace R2C2 { class ArticleNumber; +class Block; class SpeedQuantizer; class Vehicle; class VehicleType; @@ -34,7 +35,6 @@ public: void name(const std::string &); void quantized_speed(); void router(); - void timetable(); void vehicle(ArticleNumber); }; @@ -63,8 +63,8 @@ private: Msp::Time::TimeStamp stop_timeout; unsigned functions; + BlockIter last_entry_block; Msp::Time::TimeStamp last_entry_time; - float travel_dist; bool pure_speed; SpeedQuantizer *speed_quantizer; bool accurate_position; @@ -130,10 +130,10 @@ private: void control_changed(const Controller::Control &); void loco_speed_event(unsigned, unsigned, bool); void loco_func_event(unsigned, unsigned, bool); - void block_state_changed(Block &, Block::State); + void sensor_state_changed(Sensor &, Sensor::State); void halt_event(bool); void block_reserved(const Block &, const Train *); - float get_reserved_distance_until(const Block *, bool) const; + float get_reserved_distance_until(const Block *) const; }; } // namespace R2C2