#define LIBMARKLIN_AICONTROL_H_
#include <sigc++/trackable.h>
-#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 void tick(const Msp::Time::TimeDelta &);
private:
- void control_changed(const TrainControl &);
+ void control_changed(const Control &);
void arrived();
};