X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.h;h=59aa9dc022365be78823885a210f0431872dc48b;hb=d3a7a9e9ad694d52ccca8b6038501772fdc1dfd5;hp=b72fbf635c1d613c8e7f4aab07333dc4fb29eed3;hpb=26e741a3e8f1c83e717318f69ff02eed9b0ef6de;p=r2c2.git diff --git a/source/libr2c2/train.h b/source/libr2c2/train.h index b72fbf6..59aa9dc 100644 --- a/source/libr2c2/train.h +++ b/source/libr2c2/train.h @@ -14,13 +14,13 @@ Distributed under the GPL #include "block.h" #include "blockiter.h" #include "controller.h" +#include "trainai.h" namespace R2C2 { class ArticleNumber; class Route; class SpeedQuantizer; -class Timetable; class Vehicle; class VehicleType; class Zone; @@ -50,6 +50,7 @@ public: sigc::signal signal_name_changed; sigc::signal signal_control_changed; sigc::signal signal_function_changed; + sigc::signal signal_ai_event; sigc::signal signal_route_changed; sigc::signal signal_advanced; sigc::signal signal_arrived; @@ -82,7 +83,7 @@ private: bool reserving; bool advancing; Controller *controller; - Timetable *timetable; + std::list ais; bool active; unsigned current_speed_step; bool speed_changing; @@ -131,8 +132,10 @@ public: bool get_function(unsigned) const; unsigned get_functions() const { return functions; } - void set_timetable(Timetable *); - Timetable *get_timetable() { return timetable; } + void add_ai(TrainAI &); + void remove_ai(TrainAI &); + TrainAI *get_tagged_ai(const std::string &); + void ai_message(const TrainAI::Message &); bool set_route(const Route *); bool go_to(Track &);