|
Event-Driven Programming in C++ 1.0
A case study on event-driven programming in C++
|
Interface for observer objects. More...
#include <observer.hpp>
Public Member Functions | |
| virtual | ~IObserver ()=default |
| Virtual destructor. | |
| virtual void | onNotify (const std::string &message)=0 |
| Notifies the observer of an event. | |
Interface for observer objects.
The IObserver interface declares the onNotify() method that must be implemented by any class that wishes to be notified of events by a Subject.
|
virtualdefault |
Virtual destructor.
Ensures that derived classes are properly destroyed.
|
pure virtual |
Notifies the observer of an event.
This pure virtual function must be overridden by derived classes to handle event notifications.
| message | A string containing details about the event. |
Implemented in ConcreteObserver, and TestObserver.