FunctionLib Class Reference

#include <genericfunction.h>

Public Types

using DestructWrapper = void(*)(const void *)
 
using InvokeWrapper = Result< void >(*)(void *, GenericSingletonContainerInterface *outputs, GenericSingletonContainerInterface *inputs)
 

Static Public Member Functions

static MAXON_METHOD Result< GenericFunction > CreateConstantFunction (const InternedId &outputId, const DataType &resultType, const ConstDataPtr &value)
 
template<typename RESULT >
static Result< Function< RESULT()> > CreateConstantFunction (const typename std::decay< typename maxon::details::MemberType< RESULT >::type >::type &value)
 
template<typename FUNC , typename FN >
static Result< FUNC > CreateWrapper (FN &&function)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (FunctionLib, MAXON_REFERENCE_NONE, "net.maxon.interface.functionlib")
 

Static Private Member Functions

static MAXON_METHOD Result< GenericFunction > PrivateCreateWrapper (void *function, const DataType &type, DestructWrapper destruct, InvokeWrapper invoke)
 

Member Typedef Documentation

◆ DestructWrapper

using DestructWrapper = void (*) (const void*)

◆ InvokeWrapper

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( FunctionLib  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.interface.functionlib"   
)
private

◆ CreateConstantFunction() [1/2]

static MAXON_METHOD Result<GenericFunction> CreateConstantFunction ( const InternedId outputId,
const DataType resultType,
const ConstDataPtr value 
)
static
Parameters
[in]valueTODO: (Ole) please document.

◆ CreateConstantFunction() [2/2]

static Result<Function<RESULT()> > CreateConstantFunction ( const typename std::decay< typename maxon::details::MemberType< RESULT >::type >::type &  value)
static

◆ CreateWrapper()

static Result<FUNC> CreateWrapper ( FN &&  function)
static

◆ PrivateCreateWrapper()

static MAXON_METHOD Result<GenericFunction> PrivateCreateWrapper ( void *  function,
const DataType type,
DestructWrapper  destruct,
InvokeWrapper  invoke 
)
staticprivate