namespace R2C2 {
class Block;
+class Track;
class Train;
+class Zone;
class Timetable: public sigc::trackable
{
Loader(Timetable &);
private:
void arrive();
- void go_to(const std::string &);
+ void goto_sensor(unsigned);
+ void goto_sensor(const std::string &);
+ void goto_zone(const std::string &);
void route(const std::string &);
void reverse();
void speed(unsigned);
void travel(const std::string &);
void wait(unsigned);
- void wait_train(unsigned, const std::string &);
+ void wait_train(unsigned, unsigned);
};
enum RowType
{
- GOTO,
+ GOTO_SENSOR,
+ GOTO_ZONE,
TRAVEL,
WAIT_TIME,
WAIT_TRAIN,
void tick(const Msp::Time::TimeStamp &);
void save(std::list<Msp::DataFile::Statement> &) const;
private:
- Block &parse_location(const std::string &);
+ Track &get_sensor(unsigned);
+ Zone &get_zone(const std::string &);
void sensor_event(unsigned, bool);
void train_arrived();
};