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

#include <closure.h>

Public Types

typedef etl::delegate< TReturn(TArg0)> delegate_type
 The delegate type to be invoked.

Public Member Functions

 closure (const delegate_type &f, const TArg0 arg0)
TReturn operator() () const

Detailed Description

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

Closure for binding one argument to a delegate and invoking it later.

Template Parameters
TReturnThe return type of the delegate.
TArg0The type of the argument.

Constructor & Destructor Documentation

◆ closure()

template<typename TReturn, typename TArg0>
etl::closure< TReturn(TArg0)>::closure ( const delegate_type & f,
const TArg0 arg0 )
inline

Construct a closure with a delegate and its argument.

Parameters
fThe delegate to be invoked.
arg0The argument to bind to the delegate.

Member Function Documentation

◆ operator()()

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

Invoke the stored delegate with the bound argument.

Returns
The result of the delegate invocation.

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