ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
adtf::ucom::nitro Namespace Reference

Namespace for all functionality provided since v3.13. More...

Classes

class  function_wrapper
 Implements iucom_function for the given signature. More...
 
class  function_wrapper< ResultType(Arguments...)>
 Implements iucom_function for the given signature. More...
 
class  ifunction
 Interface for functions that can be passed via IObject interfaces. More...
 
class  ifunction< ResultType(Arguments...)>
 Interface for functions that can be passed via IObject interfaces. More...
 

Typedefs

template<typename Signature>
using ifunction_ptr = ant::iobject_ptr<ifunction<Signature>>
 Interface for shared pointers to iucom_function.
 

Functions

template<typename Callable, typename Signature = detail::signature_t<Callable>>
function_wrapper< Signature > make_function (Callable &&fnCallback)
 creates a ucom_function object for the given callable.
 
template<typename Callable, typename Signature = detail::signature_t<Callable>>
ant::object_ptr< ifunction< Signature > > make_function_ptr (Callable &&fnCallback)
 creates an object_ptr shared pointer to an ucom_function pointing to the given callable.
 
template<typename Signature>
std::function< Signature > to_std_function (const ifunction< Signature > &fnFunction)
 Helper conversion to a std::function object.
 
template<typename Signature>
std::function< Signature > to_std_function (const ifunction_ptr< Signature > &pFunction)
 Helper conversion to a std::function object.
 

Detailed Description

Namespace for all functionality provided since v3.13.

Typedef Documentation

◆ ifunction_ptr

template<typename Signature>
using ifunction_ptr = ant::iobject_ptr<ifunction<Signature>>

Interface for shared pointers to iucom_function.

Definition at line 47 of file function_ptr.h.

Function Documentation

◆ make_function()

template<typename Callable, typename Signature = detail::signature_t<Callable>>
function_wrapper< Signature > make_function ( Callable && fnCallback)
inline

creates a ucom_function object for the given callable.

Template Parameters
CallableThe callable type that should be exposed via the function object.
Parameters
fnCallbackThe callable that should be exposed via the function object.
Returns
a function object wrapping the given callable.

Definition at line 159 of file function_ptr.h.

◆ make_function_ptr()

template<typename Callable, typename Signature = detail::signature_t<Callable>>
ant::object_ptr< ifunction< Signature > > make_function_ptr ( Callable && fnCallback)
inline

creates an object_ptr shared pointer to an ucom_function pointing to the given callable.

Template Parameters
CallableThe callable type that should be exposed via the shared pointer.
Parameters
fnCallbackThe callable that should be exposed via the shared pointer.
Returns
an object_ptr to an ucom_function pointing to the given callable.

Definition at line 171 of file function_ptr.h.

References adtf::ucom::ant::make_object_ptr().

◆ to_std_function() [1/2]

template<typename Signature>
std::function< Signature > to_std_function ( const ifunction< Signature > & fnFunction)
inline

Helper conversion to a std::function object.

Use this to forward an ifunction to STL alrorithms etc.

Parameters
[in]fnFunctionthe function object.

Definition at line 182 of file function_ptr.h.

◆ to_std_function() [2/2]

template<typename Signature>
std::function< Signature > to_std_function ( const ifunction_ptr< Signature > & pFunction)
inline

Helper conversion to a std::function object.

Use this to forward an ifunction_ptr to STL alrorithms etc.

Parameters
[in]pFunctionthe function object.

Definition at line 193 of file function_ptr.h.