gatb.core-API-0.0.0
|
Class that notifies potential observers. More...
#include <Observer.hpp>
Public Member Functions | |
Subject () | |
Subject (const InterfaceId &interface) | |
virtual | ~Subject () |
InterfaceId | getInterface () |
void | addObserver (IObserver *observer) |
void | removeObserver (IObserver *observer) |
void | notify (EventInfo *event) |
Public Member Functions inherited from ISubject | |
virtual | ~ISubject () |
Class that notifies potential observers.
The main purpose of this class is to manage the set of IObservers attached to the subject.
Then, classes that want subject-like behavior can inherit from Subject or have a Subject attribute.
Subject | ( | ) |
Constructor.
Subject | ( | const InterfaceId & | interface | ) |
Constructor.
[in] | interface | : the identifier of the subject. |
|
virtual |
Destructor.
|
virtual |
Attach an observer to this subject.
[in] | observer | : the observer to be attached. |
Implements ISubject.
|
inlinevirtual |
Returns the identifier of the subject.
Implements ISubject.
|
virtual |
|
virtual |
Detach an observer from this subject.
[in] | observer | : the observer to be detached. |
Implements ISubject.