56 void notify(
const std::string &message) {
Interface for observer objects.
Definition observer.hpp:35
The Subject class manages a list of observers and notifies them of events.
Definition subject.hpp:25
void addObserver(IObserver *observer)
Adds an observer to the list of observers.
Definition subject.hpp:32
void removeObserver(IObserver *observer)
Removes an observer from the list.
Definition subject.hpp:41
std::vector< IObserver * > observers
Container storing pointers to the registered observers.
Definition subject.hpp:65
void notify(const std::string &message)
Notifies all registered observers of an event.
Definition subject.hpp:56
Implements the Observer design pattern for event notifications.
Declaration of the IObserver interface for the Observer pattern.