1 #ifndef LIBR2C2_TIMETABLE_H_
2 #define LIBR2C2_TIMETABLE_H_
4 #include <msp/datafile/objectloader.h>
12 class Timetable: public TrainAI
15 class Loader: public Msp::DataFile::ObjectLoader<Timetable>
21 Loader(Timetable &, Layout &);
35 class Loader: public Msp::DataFile::ObjectLoader<Row>
41 Loader(Row &, Layout &);
44 void zone(const std::string &, unsigned);
45 void time(Msp::Time::RawTime);
50 Msp::Time::TimeDelta time;
54 void save(std::list<Msp::DataFile::Statement> &) const;
57 sigc::signal<void, unsigned, const Row &> signal_row_added;
58 sigc::signal<void, unsigned, const Row &> signal_row_modified;
59 sigc::signal<void, unsigned> signal_row_removed;
63 std::list<Row>::iterator current_row;
69 void append_row(const Row &);
70 void insert_row(unsigned, const Row &);
71 void modify_row(unsigned, const Row &);
72 void remove_row(unsigned);
74 unsigned get_length() const { return rows.size(); }
75 const Row &get_row(unsigned) const;
77 virtual void tick(const Msp::Time::TimeDelta &);
79 void save(std::list<Msp::DataFile::Statement> &) const;
82 void check_update(std::list<Row>::const_iterator);
84 void event(TrainAI &, const Message &);