#include <sigc++/trackable.h>
#include <msp/time/timestamp.h>
#include "block.h"
+#include "controller.h"
namespace Marklin {
-class ControlModel;
class Route;
class Timetable;
class Vehicle;
class VehicleType;
-struct TrainControl;
class Train: public sigc::trackable
{
std::list<BlockRef> cur_blocks;
std::list<BlockRef> rsv_blocks;
Block *pending_block;
- ControlModel *control;
+ bool reserving;
+ bool advancing;
+ Controller *controller;
Timetable *timetable;
bool active;
unsigned current_speed;
const std::string &get_name() const { return name; }
void set_priority(int);
int get_priority() const { return priority; }
- ControlModel &get_control_model() const { return *control; }
+ Controller &get_controller() const { return *controller; }
void add_vehicle(const VehicleType &);
void remove_vehicle(unsigned);
void save(std::list<Msp::DataFile::Statement> &) const;
private:
- void control_changed(const TrainControl &);
+ void control_changed(const Controller::Control &);
void loco_speed_event(unsigned, unsigned, bool);
void loco_func_event(unsigned, unsigned, bool);
void sensor_event(unsigned, bool);