|
sipxportlib
Version 3.3
|
#include <UtlObservable.h>

Public Member Functions | |
| virtual | ~UtlObservable () |
| virtual void | registerObserver (UtlObserver *observer)=0 |
| virtual void | removeObserver (UtlObserver *observer)=0 |
Protected Member Functions | |
| virtual void | notify (int code, void *pUserData)=0 |
Simple interface for any object which is observable, meaning that observers can register to be notified of the observable's state changes.
|
inlinevirtual |
|
pure virtual |
Registers a listener of this observable. Derived classes of UtlObservable should store its observers in a collection.
| observer | The observer that wants to "listen to" this observable's state changes. |
Implemented in UtlObservableImpl.
|
pure virtual |
Removes a listener of this observable. Derived classes of UtlObservable should remove this observer from it's collection.
| observer | The observer that no longer wants to "listen to" this observable's state changes. |
Implemented in UtlObservableImpl.
|
protectedpure virtual |
The observable calls this to notify its observers of a change. Derived classes should iterate through their collection of observers and call UtlObserver->onNotify .
| code | An integer notification value. For example, it can be used to indicate the observable's state. |
| pUserData | A reference to any object that the observable may pass to the observer. |
Implemented in UtlObservableImpl.
1.8.11