enum RowType
{
ARRIVE = 1,
- DEPART
+ DEPART,
+ THROUGH
};
struct Row
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;
std::list<Row> rows;
std::list<Row>::iterator current_row;
bool update_pending;
+ bool sync_to_clock;
public:
Timetable(Train &);
void save(std::list<Msp::DataFile::Statement> &) const;
private:
- void check_update(std::list<Row>::const_iterator);
+ void check_update(const 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