X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftimetable.h;h=67e5ad4ecb8d8684006bf5a1a31d15eaf6711424;hb=9a7097fed866060efb8738f8b2f17d5c96a6c980;hp=9ec804e0692d02834c72fa2de50bdb4fc6f0c795;hpb=8a2b5c1ac2fc07e280dc678165d2ca58f7d07e32;p=r2c2.git diff --git a/source/libr2c2/timetable.h b/source/libr2c2/timetable.h index 9ec804e..67e5ad4 100644 --- a/source/libr2c2/timetable.h +++ b/source/libr2c2/timetable.h @@ -2,12 +2,12 @@ #define LIBR2C2_TIMETABLE_H_ #include +#include "trackchain.h" #include "trainai.h" namespace R2C2 { class Layout; -class TrackChain; class Timetable: public TrainAI { @@ -44,11 +44,13 @@ public: private: void block(unsigned); void time(Msp::Time::RawTime); - void zone(const std::string &, unsigned); + void zone(const std::string &); + void zone_numbered(const std::string &, unsigned); }; RowType type; TrackChain *target; + TrackChain::Direction direction; Msp::Time::TimeDelta time; Row(); @@ -74,6 +76,8 @@ private: std::list::iterator current_row; bool update_pending; bool sync_to_clock; + bool late_arrival; + std::list::iterator next_depart; public: Timetable(Train &); @@ -87,7 +91,10 @@ public: const Row &get_row(unsigned) const; virtual void tick(const Msp::Time::TimeDelta &); +private: + bool passed_row(const Row &, const Msp::Time::TimeDelta &) const; +public: void save(std::list &) const; private: @@ -96,6 +103,7 @@ private: void update_route(); void event(TrainAI &, const Message &); void record_time(); + void clock_discontinuity(); }; } // namespace R2C2