![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Class to support observer pattern. More...
#include <inviwo/core/util/observer.h>
Public Member Functions | |
| void | addObserver (T *observer) |
| bool | isObservedBy (T *observer) const |
| Observable (const Observable< T > &other) | |
| Observable (Observable< T > &&other) noexcept | |
| Observable< T > & | operator= (const Observable< T > &other) |
| Observable< T > & | operator= (Observable< T > &&other) noexcept |
| 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.
|
noexcept |
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.
|
noexcept |
This operation will remove all observers of this, and make all observers of other observe this instead.
|
finaloverridevirtual |
Implements inviwo::ObservableInterface.
|
finaloverridevirtual |
Implements inviwo::ObservableInterface.