]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/timetable.h
Support waypoints in Timetable
[r2c2.git] / source / libr2c2 / timetable.h
index b67e5fb3c2baa4761b639dae6a55e3902795e014..da16d3c0d488c23cffc7d3879fcf2c367e611141 100644 (file)
@@ -7,7 +7,7 @@
 namespace R2C2 {
 
 class Layout;
-class Zone;
+class TrackChain;
 
 class Timetable: public TrainAI
 {
@@ -27,7 +27,8 @@ public:
        enum RowType
        {
                ARRIVE = 1,
-               DEPART
+               DEPART,
+               THROUGH
        };
 
        struct Row
@@ -41,12 +42,13 @@ public:
                        Loader(Row &, Layout &);
 
                private:
-                       void zone(const std::string &, unsigned);
+                       void block(unsigned);
                        void time(Msp::Time::RawTime);
+                       void zone(const std::string &, unsigned);
                };
 
                RowType type;
-               Zone *zone;
+               TrackChain *target;
                Msp::Time::TimeDelta time;
 
                Row();
@@ -82,6 +84,7 @@ private:
        void check_update(std::list<Row>::const_iterator);
        void update_route();
        void event(TrainAI &, const Message &);
+       void record_time();
 };
 
 } // namespace R2C2