CSCI3081W Drone Delivery System
IController.h
1 #ifndef CONTROLLER_H_
2 #define CONTROLLER_H_
3 
4 #include "IEntity.h"
5 #include "util/json.h"
6 
7 //-------------------- Controller Interface ----------------------------
8 
11 
15 class IController {
16  public:
20  virtual ~IController() {}
21 
26  virtual void addEntity(const IEntity& entity) = 0;
27 
32  virtual void updateEntity(const IEntity& entity) = 0;
33 
38  virtual void removeEntity(const IEntity& entity) = 0;
39 
45  virtual void sendEventToView(const std::string& event,
46  const JsonObject& details) = 0;
47 };
48 
49 #endif
class for IController used for transit service. Uses the Model View
Definition: IController.h:15
virtual ~IController()
A destructor for IController.
Definition: IController.h:20
virtual void addEntity(const IEntity &entity)=0
Add the entity to the program.
virtual void updateEntity(const IEntity &entity)=0
To update the entity information and add it to the program.
virtual void sendEventToView(const std::string &event, const JsonObject &details)=0
To allow message to be passed back to the view.
virtual void removeEntity(const IEntity &entity)=0
To remove the entity from the program.
Represents an entity in a physical system.
Definition: IEntity.h:22
Manages a picojson::object, works with JsonValue to provide implicit casting.