Defined in:An object inherits from the
Observableclass when it can be observed, and the
Observableclass provides a mechanism for notifying the observers of the object when events occur.
template <class observableType, class eventType = void> class Observable
||Returns a boolean value indicating whether an observable object has any observers.|
||Installs an observer on an observable object.|
||Removes an observer from an observable object.|
||Posts an event to an observable object.|
||The type of the class that can be observed. This parameter should be the type of the class that inherits directly from the |
||The type of an event object that is sent to observers when an event occurs. If there is no event object, then this parameter should be omitted.|
Observableclass maintains a list of observers that are listening to an observable object for event notifications. An observable object inherits from the
Observers are installed by calling the
Observable::AddObserverfunction for the observable object. When an event occurs, the observable object calls the
Observable::PostEventfunction to sent an event to its current observers.