Inviwo
0.9.10.1
Inviwo documentation
|
#include <observer.h>
Public Member Functions | |
Observable (const Observable< T > &other) | |
Observable (Observable< T > &&other) | |
Observable< T > & | operator= (const Observable< T > &other) |
Observable< T > & | operator= (Observable< T > &&other) |
void | addObserver (T *observer) |
void | removeObserver (T *observer) |
virtual void | startBlockingNotifications () override final |
virtual void | stopBlockingNotifications () override final |
Protected Member Functions | |
template<typename C > | |
void | forEachObserver (C callback) |
Protected Member Functions inherited from inviwo::ObservableInterface | |
void | addObservationHelper (Observer *observer) |
void | removeObservationHelper (Observer *observer) |
Class to support observer pattern.
Example of how to apply it to a simple button.
Usage:
inviwo::Observable< T >::Observable | ( | const Observable< T > & | other | ) |
This operation does nothing. We will not touch the observers of other.
inviwo::Observable< T >::Observable | ( | Observable< T > && | other | ) |
This operation will remove all observers from other and add them to this.
Observable< T > & inviwo::Observable< T >::operator= | ( | const Observable< T > & | other | ) |
This operation does nothing. We will not touch the observers of other.
Observable< T > & inviwo::Observable< T >::operator= | ( | Observable< T > && | other | ) |
This operation will remove all observers of this, and make all observers of other observe this instead.