OpenViBE Observable class.
More...
|
virtual void | addObserver (IObserver *o) |
| Add the observer give in parameter in the list of observers of the object. More...
|
|
virtual void | deleteObserver (IObserver *o) |
| Remove the observer give in parameter from the list of observers of the object. Only the first occurence of the observer will be remove from the list. More...
|
|
|
virtual void | setChanged () |
| This function is used to indicate when the notification need to reach the observers. If this function is not called before notifyObserver, the notification will be ignore. More...
|
|
virtual void | clearChanged () |
| Revert the effect of setChanged.
|
|
virtual OpenViBE::boolean | hasChanged () |
| Indicate if some change have been made. More...
|
|
virtual void | notifyObservers (void *data=NULL) |
| Notify all registered observers. More...
|
|
OpenViBE Observable class.
- Author
- Guillaume Serrière (Inria/Loria)
- Date
- 2014-11-7 This class furnished all mecanisms to handle the Observable part of the Observer/Observable pattern implementation of OpenViBE.
Add the observer give in parameter in the list of observers of the object.
- Parameters
-
o | [in] : the observer to add |
- Note
- A same observer can be add multiple time.
Remove the observer give in parameter from the list of observers of the object. Only the first occurence of the observer will be remove from the list.
- Parameters
-
o | [in] : the observer to remove |
This function is used to indicate when the notification need to reach the observers. If this function is not called before notifyObserver, the notification will be ignore.
- Note
- The "changed" state will be reverted after each call to clearChanged and notifyObservers.
Indicate if some change have been made.
- Returns
- true if setChanged have been called this the last clearChanged/notifyObservers call.
-
false in other case.
void notifyObservers |
( |
void * |
data = NULL | ) |
|
|
protectedvirtual |
Notify all registered observers.
- Parameters
-
data | [in] : a pointer to data that will be send to observers. |