FunctionBaseInterface Class Reference

#include <observable.h>

Inheritance diagram for FunctionBaseInterface:

详细描述

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")

成员函数文档编制

◆  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.

参数
[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).
返回
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.

参数
[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,
返回
OK on success.

◆  Set()

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

◆  GetOwner()

MAXON_METHOD void GetOwner ( ObserverObjectRef &  res ) const

◆  GetObserver()

MAXON_METHOD void GetObserver ( ObserverObjectRef &  res ) const

◆  GetObserverPointer()

const MAXON_METHOD void* GetObserverPointer ( ) const

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

◆  Execute()

MAXON_METHOD Result < 数据 > Execute ( const Block < const ConstDataPtr > &  args )
参数
[in] args Block with a number of arguments.