41 #ifndef _ncvruntimetemplates_hpp_
42 #define _ncvruntimetemplates_hpp_
44 #pragma warning( disable: 4800 )
87 template <
class T,
class U>
119 template <
class TList,
unsigned int index>
struct TypeAt;
121 template <
class Head,
class Tail>
127 template <
class Head,
class Tail,
unsigned int i>
147 template<
typename TList,
int NumArguments,
class Func>
152 static void call(Func *functor, ...)
155 std::vector<int> templateParamList;
159 va_start(listPointer, functor);
161 for(
int i=0; i<NumArguments; i++)
163 int val = va_arg(listPointer,
int);
164 templateParamList.push_back(val);
169 call(*functor, templateParamList);
174 static void call( Func &functor, std::vector<int> &templateParamList)
177 NcvBool val = templateParamList[templateParamList.size() - 1];
178 templateParamList.pop_back();
187 NumArguments-1, Func >
188 ::call(functor, templateParamList);
194 NumArguments-1, Func >
195 ::call(functor, templateParamList);
202 template<
class TList,
class Func>
205 static void call(Func &functor)
208 functor.call(TList());
211 static void call(Func &functor, std::vector<int> &templateParams)
213 functor.call(TList());
typename TypeAt< Tail, i - 1 >::Result Result
static void call(Func &functor, std::vector< int > &templateParams)
static void call(Func &functor)
static void call(Func *functor,...)
static void call(Func &functor, std::vector< int > &templateParamList)