]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trainrouter.h
Be more permissive when checking route continuity
[r2c2.git] / source / libr2c2 / trainrouter.h
index 80908d51b863ab63294f35df5dd994d197480ab2..9fab2892efe15803da1f413277f7a6bd25678122 100644 (file)
@@ -43,7 +43,9 @@ private:
        enum ArrivalState
        {
                ON_THE_WAY,
+               WAITING_FOR_SEQUENCE,
                RESERVED_TO_END,
+               ADVANCED_TO_END,
                ARRIVED
        };
 
@@ -79,6 +81,7 @@ public:
        const Route *get_route() const;
        unsigned get_current_sequence() const { return current_sequence; }
 private:
+       void use_planned_route();
        void route_changed();
 
 public:
@@ -105,10 +108,11 @@ private:
 
        void create_metrics();
        bool create_lead_route();
-       bool is_valid_for_track(const Route &, const TrackIter &) const;
        bool advance_to_track(RouteList::iterator &, const TrackIter &);
 
+       static void get_routers(Layout &, std::vector<TrainRouter *> &);
        static void start_planning(Layout &);
+       static void apply_plan(Layout &, TrainRoutePlanner &);
 };
 
 } // namespace R2C2