XLL+ Class Library (7.0)

CXlEvent<T>::Register

Add an observer (listener) to an event

void Register(
   CXlEventObserver<T>* observer
);

Parameters

observer

A pointer to an observer of events of the appropriate type. The observer will receive updates when CXlEvent::NotifyObservers() is called.

Remarks

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.

Requirements

Header: xlpevents.h

See Also

CXlEvent<T> Class | CXlEvent<T> Methods