Event-Driven Programming in C++ 1.0
A case study on event-driven programming in C++
Loading...
Searching...
No Matches
observer.hpp
Go to the documentation of this file.
1
9#ifndef OBSERVER_HPP
10#define OBSERVER_HPP
11
12#include <string>
13
27namespace observer {
28
35class IObserver {
36public:
42 virtual ~IObserver() = default;
43
52 virtual void onNotify(const std::string &message) = 0;
53};
54
55} // namespace observer
56
57#endif // OBSERVER_HPP
Interface for observer objects.
Definition observer.hpp:35
virtual ~IObserver()=default
Virtual destructor.
virtual void onNotify(const std::string &message)=0
Notifies the observer of an event.
Implements the Observer design pattern for event notifications.