Function wrapper and binding of parameters.
More...
|
template<class ClassType , typename ReturnType , ... > |
Function< ReturnType,[Arg1,..., Arg5]> | embb::base::MakeFunction (ClassType &obj, ReturnType(ClassType::*func)([Arg1,..., Arg5])) |
| Wraps an object and a member function pointer into a Function. More...
|
|
template<typename ReturnType , ... > |
Function< ReturnType,[Arg1,..., Arg5]> | embb::base::MakeFunction (ReturnType(*func)([Arg1,..., Arg5])) |
| Wraps a function pointer into a Function. More...
|
|
template<typename ReturnType , UnboundArgument , Arg1 , ... > |
Function< ReturnType[, UnboundArgument]> | embb::base::Bind (Function< ReturnType, Arg1[,..., Arg5]> func, Arg1 value1,...) |
| Binds given values as arguments of func into a new Function. More...
|
|
Function wrapper and binding of parameters.
template<class ClassType , typename ReturnType , ... >
Function<ReturnType, [Arg1, ..., Arg5]> embb::base::MakeFunction |
( |
ClassType & |
obj, |
|
|
ReturnType(ClassType::*)([Arg1,..., Arg5]) |
func |
|
) |
| |
Wraps an object and a member function pointer into a Function.
- Returns
- Function with same return value and argument syntax as
func
- See also
- Function
- Template Parameters
-
ClassType | Class that contains the member function pointed to by func . |
ReturnType | Return type of member function pointed to by func |
[Arg1,...,Arg5] | (Optional) Types of up to five arguments of the member function |
- Parameters
-
[in] | obj | Reference to the object with corresponding member function |
[in] | func | Member function pointer with up to five optional arguments |
template<typename ReturnType , ... >
Function<ReturnType, [Arg1, ..., Arg5]> embb::base::MakeFunction |
( |
ReturnType(*)([Arg1,..., Arg5]) |
func | ) |
|
Wraps a function pointer into a Function.
- Returns
- Function with same return value and argument syntax as
func
- See also
- Function
- Template Parameters
-
ReturnType | Return type of member function pointed to by func . |
[Arg1,...,Arg5] | (Optional) Types of up to five arguments of the member function |
- Parameters
-
[in] | func | Function pointer with up to five optional arguments |
template<typename ReturnType , UnboundArgument , Arg1 , ... >
Function<ReturnType[, UnboundArgument]> embb::base::Bind |
( |
Function< ReturnType, Arg1[,..., Arg5]> |
func, |
|
|
Arg1 |
value1, |
|
|
|
... |
|
) |
| |
Binds given values as arguments of func
into a new Function.
The new Function has no arguments or one, if Placeholder::_1 is given as one of the values. The position of Placeholder::_1 determines which argument of func
is not bound.
- Dynamic memory allocation
- Allocates dynamic memory to hold the parameters.
- Returns
- Function that uses given values as parameters
- See also
- Placeholder, Function
- Template Parameters
-
ReturnType | Return type of func and parameterless function returned |
[UnboundArgument] | Type of not bound argument of func , only present when a placeholder is used as value in the bind. |
Arg1[,...,Arg5] | Types of up to five arguments of the values to bind |
- Parameters
-
[in] | func | The Function to bind the values (value1 , ...) to |
[in] | value1 | At least one and up to five values to bind as arguments of func . Placeholder::_1 can be used instead of one of the values to keep the corresponding argument of func unbound. |