Pakman
AbstractController.h
1 #ifndef ABSTRACTCONTROLLER_H
2 #define ABSTRACTCONTROLLER_H
3 
4 #include <memory>
5 #include <vector>
6 #include <string>
7 
8 #include "core/common.h"
9 
10 class AbstractMaster;
11 class LongOptions;
12 class Arguments;
13 class Command;
14 
45 {
46  public:
47 
49  AbstractController() = default;
50 
52  virtual ~AbstractController() = default;
53 
59  void assignMaster(std::shared_ptr<AbstractMaster> p_master);
60 
62  virtual void iterate() = 0;
63 
65  virtual Command getSimulator() const = 0;
66 
75  static controller_t getController(const std::string& arg);
76 
93  static std::string help(controller_t controller);
94 
111  static void addLongOptions(controller_t controller,
112  LongOptions& lopts);
113 
132  const Arguments& args);
133 
134  protected:
135 
137  std::shared_ptr<AbstractMaster> m_p_master;
138 };
139 
140 #endif // ABSTRACTCONTROLLER_H
static controller_t getController(const std::string &arg)
void assignMaster(std::shared_ptr< AbstractMaster > p_master)
controller_t
Definition: common.h:45
static std::string help(controller_t controller)
virtual void iterate()=0
AbstractController()=default
virtual Command getSimulator() const =0
static AbstractController * makeController(controller_t controller, const Arguments &args)
std::shared_ptr< AbstractMaster > m_p_master
virtual ~AbstractController()=default
static void addLongOptions(controller_t controller, LongOptions &lopts)