MEL
Microthread & Execution library
ParamAdder_prev Class Reference

create new functor with new param for operator() BEFORE any other param usage: suppose we have a function with signature: int f( ) and we need this function to adapt to a function with one argument of, for example, float type. Then do: addParam<int,float,void>( f ); That create a function wich receives a float, so you call that function this way: addParam_prev<int,float,void>( f )( 6.7f ); where first argument is return type, second is new type and else original arguments More...

#include <ParamAdderImpl.h>

Detailed Description

create new functor with new param for operator() BEFORE any other param usage: suppose we have a function with signature: int f( ) and we need this function to adapt to a function with one argument of, for example, float type. Then do: addParam<int,float,void>( f ); That create a function wich receives a float, so you call that function this way: addParam_prev<int,float,void>( f )( 6.7f ); where first argument is return type, second is new type and else original arguments

same is valid for functors with more params and other return values. Example: void f( int, float ) --> want to convert to void f( char,int, float); addParam_prev<void,char,int,float>( f )('a',5,6.7f);

this is neccesary in a lot of cases, for example, when chaining functors with different arguments types NOTE not use a separate file or better organization for time reasons


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