X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Faicontrol.h;h=462a114ac00bbe2cd04078fd0dad3461a07a7abd;hb=6ba6af3637c299ab00828c49de9151429488cc17;hp=d02011f60a55186627ecca7c500cbab9144bacd5;hpb=d88bc162df8b34f2ca966524222880033132da0f;p=r2c2.git diff --git a/source/libmarklin/aicontrol.h b/source/libmarklin/aicontrol.h index d02011f..462a114 100644 --- a/source/libmarklin/aicontrol.h +++ b/source/libmarklin/aicontrol.h @@ -9,35 +9,36 @@ Distributed under the GPL #define LIBMARKLIN_AICONTROL_H_ #include -#include "controlmodel.h" -#include "traincontrol.h" +#include "controller.h" namespace Marklin { class Train; -class AIControl: public ControlModel, public sigc::trackable +class AIControl: public Controller, public sigc::trackable { private: Train &train; - ControlModel *next_model; - TrainControl target_speed; + Controller *next_ctrl; + Control target_speed; bool blocked; + bool approach; public: - AIControl(Train &, ControlModel *); + AIControl(Train &, Controller *); virtual ~AIControl(); virtual void set_control(const std::string &, float); - virtual const TrainControl &get_control(const std::string &) const; + virtual const Control &get_control(const std::string &) const; virtual float get_speed() const; + virtual bool get_reverse() const; virtual float get_braking_distance() const; virtual void tick(const Msp::Time::TimeDelta &); private: - void control_changed(const std::string &, float); + void control_changed(const Control &); void arrived(); };