#include <observable.h>

This object stores the callback function for observable notifications.
Public Member Functions | |
| 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 |
| MAXON_METHOD const void * | GetObserverPointer () const |
| MAXON_METHOD Result< Data > | Execute (const Block< const ConstDataPtr > &args) |
Private Member Functions | |
| MAXON_INTERFACE (FunctionBaseInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.functionbase", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
|
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 |
| MAXON_METHOD const void* GetObserverPointer | ( | ) | const |
Internal function. Do not use this pointer to call anything. Just compare this value to ObserverObjectInterface*.
| MAXON_METHOD Result<Data> Execute | ( | const Block< const ConstDataPtr > & | args | ) |
| [in] | args | Block with a number of arguments. |