Add an observer (listener) to an event
void Register( CXlEventObserver<T>* observer ); |
A pointer to an observer of events of the appropriate type. The observer will receive updates when CXlEvent::NotifyObservers() is called.
Note that the lifetime of the observer is entirely under the observer's control; the event does not "own" the observer, and it does not destroy the observer when the observer is unregistered. It is the responsibility of the developer to ensure that the lifetime of the observer is greater than its period of registration.
Header: xlpevents.h