XLL+ Class Library (7.0)

CXlEventObserver<T> Class

The template class for event observers. This class implements the Observer of the observer pattern.

class CXlEventObserver<T>


In the observer-based event model, CXlEventObserver is the base class for all event observers (or listeners). An argument of type T* (where T is a class derived from CXlEventArgs) will be passed to the Update() method.

An observer is added to the set of listeners for an event by calling CXlEvent::Register. It can be removed by calling CXlEvent::Unregister.

Deriving a class from CXlEventObserver<T>

A class derived from CXlEventObserver should implement the abstract virtual function Update(). This method will be called whenever the event which is being observed occurs.


Header: xlpevents.h

See Also

CXlEventObserver<T> Methods | xlpevents.h | Events