CSCI3081W Drone Delivery System
IPublisher.h
1 #ifndef IPUBLISHER_H_
2 #define IPUBLISHER_H_
3 
4 #include <set>
5 #include <string>
6 
7 #include "IObserver.h"
8 
13 class IPublisher {
14  public:
19  void addObserver(const IObserver* o);
20 
25  void removeObserver(const IObserver* o);
26 
31  void notifyObservers(const std::string& message) const;
32 
33  private:
34  std::set<const IObserver*> observers;
35 };
36 
37 #endif // IPUBLISHER_H_
Interface for Observer.
Definition: IObserver.h:10
Interface for Publisher.
Definition: IPublisher.h:13
void removeObserver(const IObserver *o)
removes an observer in the simulation
void addObserver(const IObserver *o)
adds an observer to the simulation
void notifyObservers(const std::string &message) const
notifies all observers with a specific message