Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7718 in orxonox.OLD for trunk/src/lib/util


Ignore:
Timestamp:
May 19, 2006, 3:02:29 AM (19 years ago)
Author:
bensch
Message:

trunk: functionality almost reached

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/executor/executor_functional.h

    r7717 r7718  
    164164/// HACK !! THESE WILL BE RESET AGAIN !!
    165165
    166 template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST)
    167 {
    168   return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer);
     166
     167#define EXECUTOR_FUNCTIONAL_CREATOR0() \
     168template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \
     169{ \
     170  return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer); \
    169171}
    170 template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(bool) __EXECUTOR_FUNCTIONAL_CONST)
    171 {
    172   return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, bool>(functionPointer);
     172
     173#define EXECUTOR_FUNCTIONAL_CREATOR1(type0) \
     174template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
     175{ \
     176  return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0##_TYPE>(functionPointer); \
    173177}
    174 template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(int) __EXECUTOR_FUNCTIONAL_CONST)
    175 {
    176   return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, int>(functionPointer);
     178
     179#define EXECUTOR_FUNCTIONAL_CREATOR2(type0, type1) \
     180template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
     181{ \
     182  return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0##_TYPE, type1##_TYPE>(functionPointer); \
    177183}
    178 template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(bool, int) __EXECUTOR_FUNCTIONAL_CONST)
    179 {
    180   return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, bool, int>(functionPointer);
    181 }
     184
     185#define EXECUTOR_FUNCTIONAL_CREATOR3(type0, type1, type2)
     186#define EXECUTOR_FUNCTIONAL_CREATOR4(type0, type1, type2, type3)
     187#define EXECUTOR_FUNCTIONAL_CREATOR5(type0, type1, type2, type3, type4)
     188
     189
     190
     191#define FUNCTOR_LIST(x) EXECUTOR_FUNCTIONAL_CREATOR ## x
     192#include "functor_list.h"
     193#undef FUNCTOR_LIST
     194
    182195
    183196
Note: See TracChangeset for help on using the changeset viewer.