X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftimetable.h;h=f3d62399e09b11a1e3d03843470229e957bb1e6b;hb=ee92bee98fa084645b17f65cebe4eabf70e4dee9;hp=07250ca94a941376601ad0dafd4b7419c4daaba2;hpb=1ac853ffc606b29ffd88b923ed3551ee6282afb2;p=r2c2.git diff --git a/source/libr2c2/timetable.h b/source/libr2c2/timetable.h index 07250ca..f3d6239 100644 --- a/source/libr2c2/timetable.h +++ b/source/libr2c2/timetable.h @@ -27,7 +27,8 @@ public: enum RowType { ARRIVE = 1, - DEPART + DEPART, + THROUGH }; struct Row @@ -55,6 +56,15 @@ public: void save(std::list &) const; }; + struct RowTypeMatch + { + RowType type; + + RowTypeMatch(RowType t): type(t) { } + + bool operator()(const Row &r) const { return r.type==type; } + }; + sigc::signal signal_row_added; sigc::signal signal_row_modified; sigc::signal signal_row_removed; @@ -81,8 +91,10 @@ public: private: void check_update(std::list::const_iterator); + std::list::iterator find_trip(const std::list::iterator &, std::list::iterator *); void update_route(); void event(TrainAI &, const Message &); + void record_time(); }; } // namespace R2C2