Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::closure< TReturn(TArg0, TArg1, TArg2, TArg3)> Class Template Reference

#include <closure.h>

Public Types

typedef etl::delegate< TReturn(TArg0, TArg1, TArg2, TArg3)> delegate_type

Public Member Functions

 closure (const delegate_type &f, const TArg0 arg0, const TArg1 arg1, const TArg2 arg2, const TArg3 arg3)
TReturn operator() () const

Detailed Description

template<typename TReturn, typename TArg0, typename TArg1, typename TArg2, typename TArg3>
class etl::closure< TReturn(TArg0, TArg1, TArg2, TArg3)>

Closure for binding four arguments to a delegate and invoking it later.

Template Parameters
TReturnThe return type of the delegate.
TArg0The type of the first argument.
TArg1The type of the second argument.
TArg2The type of the third argument.
TArg3The type of the fourth argument.

Constructor & Destructor Documentation

◆ closure()

template<typename TReturn, typename TArg0, typename TArg1, typename TArg2, typename TArg3>
etl::closure< TReturn(TArg0, TArg1, TArg2, TArg3)>::closure ( const delegate_type & f,
const TArg0 arg0,
const TArg1 arg1,
const TArg2 arg2,
const TArg3 arg3 )
inline

Construct a closure with a delegate and its arguments.

Parameters
fThe delegate to be invoked.
arg0The first argument to bind.
arg1The second argument to bind.
arg2The third argument to bind.
arg3The fourth argument to bind.

Member Function Documentation

◆ operator()()

template<typename TReturn, typename TArg0, typename TArg1, typename TArg2, typename TArg3>
TReturn etl::closure< TReturn(TArg0, TArg1, TArg2, TArg3)>::operator() ( ) const
inline

Invoke the stored delegate with the bound arguments.

Returns
The result of the delegate invocation.

The documentation for this class was generated from the following file: