FunctionBaseInterface Class Reference

#include <observable.h>

Inheritance diagram for FunctionBaseInterface:

Detailed Description

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< DataExecute (const Block< const ConstDataPtr > &args)
 

Private Member Functions

 MAXON_INTERFACE (FunctionBaseInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.functionbase")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( FunctionBaseInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.functionbase"   
)
private

◆ Init() [1/2]

MAXON_METHOD Result<void> Init ( const ObservableForwardFunction  forwardFunction,
DelegateBase &&  function 
)

Initializes the object for execution on JOBQUEUE_NONE.

Parameters
[in]forwardFunctionPointer 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]functionDelegate of the observer (only base class is required here).
Returns
OK on success.

◆ Init() [2/2]

MAXON_METHOD Result<void> Init ( const ObservableForwardFunction  forwardFunction,
DelegateBase &&  function,
const JobQueueRef queue 
)

Initializes the object for execution on a dedicated queue.

Parameters
[in]forwardFunctionPointer 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]functionDelegate of the observer (only base class is required here).
[in]queueQueue for the execution of the observer,
Returns
OK on success.

◆ Set()

MAXON_METHOD void Set ( ObserverObjectInterface owner,
ObserverObjectInterface observer 
)
Parameters
[in]owner...
[in]observer...

◆ GetOwner()

MAXON_METHOD void GetOwner ( ObserverObjectRef &  res) const

◆ GetObserver()

MAXON_METHOD void GetObserver ( ObserverObjectRef &  res) const

◆ GetObserverPointer()

MAXON_METHOD const void* GetObserverPointer ( ) const

Internal function. Do not use this pointer to call anything. Just compare this value to ObserverObjectInterface*.

◆ Execute()

MAXON_METHOD Result<Data> Execute ( const Block< const ConstDataPtr > &  args)
Parameters
[in]argsBlock with a number of arguments.