#include <observable.h>
Helper template reference class for implementation of observables.
ObservableClass | Can be either ObservableClass or ObservableRPCClass. |
DELEGATE | Delegate of the observable class defined in the MAXON_OBSERVABLE macro. Usually "Delegate" is appended to the observable name, e.g. ObservableMachineStateChangedDelegate. |
Public Member Functions | |
ObservableImplRef ()=default | |
~ObservableImplRef () | |
Result< void > | Init (ObserverObjectInterface *owner, const Id &observableName) |
void | Free () |
ObservableBaseRef | InitFirst (const ObserverObjectInterface *owner, const char *observableName) const |
ObservableRef< DELEGATE > | Get (const ObserverObjectInterface *owner, const char *observableName, Bool createOnDemand) const |
Int | GetObserverCount () |
template<typename... ARGS> | |
details::GetResultType< typename DELEGATE::ResultValueType >::resulttype | Notify (ARGS &&... args) const |
Private Attributes | |
ThreadSafeRef< ObservableBaseRef > | _observable |
|
default |
Default constructor, allocates the object.
~ObservableImplRef | ( | ) |
Result<void> Init | ( | ObserverObjectInterface * | owner, |
const Id & | observableName | ||
) |
void Free | ( | ) |
ObservableBaseRef InitFirst | ( | const ObserverObjectInterface * | owner, |
const char * | observableName | ||
) | const |
ObservableRef<DELEGATE> Get | ( | const ObserverObjectInterface * | owner, |
const char * | observableName, | ||
Bool | createOnDemand | ||
) | const |
Int GetObserverCount | ( | ) |
details::GetResultType<typename DELEGATE::ResultValueType>::resulttype Notify | ( | ARGS &&... | args | ) | const |
|
mutableprivate |