#include <Observer.h>
◆ Observable()
Observable::Observable |
( |
| ) |
|
|
default |
◆ ~Observable()
virtual Observable::~Observable |
( |
| ) |
|
|
virtualdefault |
◆ IsObserving()
Check whether this observable is being observed by an observer.
- Parameters
-
obs | The observer to check. |
- Returns
- True if this observable is being observed by the given observer, false otherwise.
◆ NotifyObservers()
Send a message to all observers when m_bObservableChanged is true.
- Parameters
-
message | The message to send. |
◆ operator=()
◆ RegisterObserver()
Register an observer.
- Parameters
-
obs | The observer to register. |
◆ SendMessage()
Send a message to all observer when m_bObservableChanged is true.
- Parameters
-
obs | The observer that sends the message. |
message | The message to send. |
◆ SetChanged()
void Observable::SetChanged |
( |
bool | bSetTo = true | ) |
|
|
virtual |
Mark an observable changed.
- Parameters
-
bSetTo | True to mark the observable changed, false to mark it as unchanged. |
◆ UnregisterObserver()
Unregister an observer.
- Parameters
-
obs | The observer to unregister. |
◆ ObservableMessageJob
friend class ObservableMessageJob |
|
friend |
◆ m_bObservableChanged
std::atomic<bool> Observable::m_bObservableChanged {false} |
|
protected |
true when the observable is marked as changed, false otherwise
◆ m_obsCritSection
CCriticalSection Observable::m_obsCritSection |
|
mutableprotected |
◆ m_observers
std::vector<Observer *> Observable::m_observers |
|
protected |
The documentation for this class was generated from the following files: