CSCI3081W Drone Delivery System
POI.h
1 #ifndef POI_H
2 #define POI_H
3 
4 #include "IEntity.h"
5 #include "MultiDeliveryDecorator.h"
6 
8 
15 class POI : public IEntity {
16  public:
21  POI(const JsonObject& obj);
22 
29  entity_observers[e] = o;
30  }
31 
36  void update(double dt);
37 
43 
49 
50  private:
51  // Stores pair of drones and their accompanying observe models
52  std::map<MultiDeliveryDecorator*, IObserver*> entity_observers;
53 };
54 
55 #endif // POI_H
Represents an entity in a physical system.
Definition: IEntity.h:22
Interface for Observer.
Definition: IObserver.h:10
Manages a picojson::object, works with JsonValue to provide implicit casting.
Decorator allowing for drones to make multiple deliveries, inherits from IObserver and DroneDecorator...
Definition: MultiDeliveryDecorator.h:15
Represents a point of interest in a physical system. Drones are able to make pitstops at these POIs i...
Definition: POI.h:15
void addEntityObserverCombo(MultiDeliveryDecorator *e, IObserver *o)
Constructor.
Definition: POI.h:28
void update(double dt)
Updates the POI, checks for proximity of observers.
void promptUser(MultiDeliveryDecorator *d)
Prompts the user to make an additional stop.
void pitStopHere(MultiDeliveryDecorator *d)
Facilitates drone pitstop at POI.
POI(const JsonObject &obj)
Constructor.