Tinman  1.0
controller.h
Go to the documentation of this file.
1 #ifndef CONTROLLER_H
2 #define CONTROLLER_H
3 #include <map>
4 #include <memory>
5 #include <queue>
6 
7 #include "tinman.h"
8 #include "network.h"
9 
10 class Controller {
11  public:
12  std::queue<Tinman::CarInfo> updates_;
15 
16  typedef std::shared_ptr<Controller> shared;
17 
19  virtual ~Controller();
20 
21  virtual void configure() = 0;
22  virtual void update(float delta) = 0;
23  virtual void exec(Tinman::Action action) = 0;
24 
25  void store(Tinman::CarInfo car_info);
26 
27  void disconnect();
28 };
29 
30 #endif
Car::shared car_
Definition: controller.h:13
Definition: controller.h:10
virtual ~Controller()
Definition: controller.cpp:11
ControllerObserver::shared observer_
Definition: controller.h:14
std::queue< Tinman::CarInfo > updates_
Definition: controller.h:12
virtual void update(float delta)=0
std::shared_ptr< Car > shared
Definition: car.h:44
void disconnect()
Definition: controller.cpp:14
void store(Tinman::CarInfo car_info)
Definition: controller.cpp:19
virtual void exec(Tinman::Action action)=0
Controller(Car::shared car)
Definition: controller.cpp:6
std::shared_ptr< ControllerObserver > shared
Definition: network.h:15
virtual void configure()=0
std::shared_ptr< Controller > shared
Definition: controller.h:16