]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/timetable.h
Unoccupy destination during planning when the train has departed again
[r2c2.git] / source / libr2c2 / timetable.h
index 07250ca94a941376601ad0dafd4b7419c4daaba2..f3d62399e09b11a1e3d03843470229e957bb1e6b 100644 (file)
@@ -27,7 +27,8 @@ public:
        enum RowType
        {
                ARRIVE = 1,
-               DEPART
+               DEPART,
+               THROUGH
        };
 
        struct Row
@@ -55,6 +56,15 @@ public:
                void save(std::list<Msp::DataFile::Statement> &) const;
        };
 
+       struct RowTypeMatch
+       {
+               RowType type;
+
+               RowTypeMatch(RowType t): type(t) { }
+
+               bool operator()(const Row &r) const { return r.type==type; }
+       };
+
        sigc::signal<void, unsigned, const Row &> signal_row_added;
        sigc::signal<void, unsigned, const Row &> signal_row_modified;
        sigc::signal<void, unsigned> signal_row_removed;
@@ -81,8 +91,10 @@ public:
 
 private:
        void check_update(std::list<Row>::const_iterator);
+       std::list<Row>::iterator find_trip(const std::list<Row>::iterator &, std::list<Row>::iterator *);
        void update_route();
        void event(TrainAI &, const Message &);
+       void record_time();
 };
 
 } // namespace R2C2