#include <observable.h>
This object stores the callback function for observable notifications.
公共成员函数 |
|
MAXON_METHOD Result < void > | Init (const ObservableForwardFunction forwardFunction, DelegateBase &&function) |
MAXON_METHOD Result < void > | Init (const ObservableForwardFunction forwardFunction, DelegateBase &&function, const JobQueueRef &queue) |
MAXON_METHOD void | Set ( ObserverObjectInterface *owner, ObserverObjectInterface *observer) |
MAXON_METHOD void | GetOwner (ObserverObjectRef &res) const |
MAXON_METHOD void | GetObserver (ObserverObjectRef &res) const |
const MAXON_METHOD void * | GetObserverPointer () const |
MAXON_METHOD Result < 数据 > | Execute (const Block < const ConstDataPtr > &args) |
私有成员函数 |
|
MAXON_INTERFACE ( FunctionBaseInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.functionbase") |
|
private |
MAXON_METHOD Result <void> Init | ( | const ObservableForwardFunction | forwardFunction , |
DelegateBase && | function | ||
) |
Initializes the object for execution on JOBQUEUE_NONE.
[in] | forwardFunction | Pointer to a function which unpacks the parameters and forwards them to the delegate: static maxon::Result<maxon::Data> Execute(const DelegateBase&, const maxon::Block<maxon::ConstDataPtr>&) |
[in] | function | Delegate of the observer (only base class is required here). |
MAXON_METHOD Result <void> Init | ( | const ObservableForwardFunction | forwardFunction , |
DelegateBase && | function , | ||
const JobQueueRef & | queue | ||
) |
Initializes the object for execution on a dedicated queue.
[in] | forwardFunction | Pointer to a function which unpacks the parameters and forwards them to the delegate: static maxon::Result<maxon::Data> Execute(const DelegateBase&, const maxon::Block<maxon::ConstDataPtr>&) |
[in] | function | Delegate of the observer (only base class is required here). |
[in] | queue | Queue for the execution of the observer, |
MAXON_METHOD void Set | ( | ObserverObjectInterface * | owner , |
ObserverObjectInterface * | observer | ||
) |
[in] | owner | ... |
[in] | observer | ... |
MAXON_METHOD void GetOwner | ( | ObserverObjectRef & | res | ) | const |
MAXON_METHOD void GetObserver | ( | ObserverObjectRef & | res | ) | const |
const MAXON_METHOD void* GetObserverPointer | ( | ) | const |
Internal function. Do not use this pointer to call anything. Just compare this value to ObserverObjectInterface*.
MAXON_METHOD Result < 数据 > Execute | ( | const Block < const ConstDataPtr > & | args | ) |
[in] | args | Block with a number of arguments. |