Changeset 9740 in orxonox.OLD for branches/new_class_id/src/lib/util/executor/functor_generic.h
- Timestamp:
- Sep 16, 2006, 1:38:36 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/executor/functor_generic.h
r9739 r9740 1 1 /*! 2 * @file executor_functional.h2 * @file functor_generic.h 3 3 * Definition of an Executor 4 4 */ … … 19 19 */ 20 20 21 22 #ifndef __FUNCTOR_MEMBER_H_23 #define __FUNCTOR_MEMBER_H_24 25 #include "executor_member.h"26 #include "substring.h"27 28 21 // // // // // // // // // // // // // 29 22 //// EXTENSION TO HIDE CONSTRUCT ///// … … 31 24 /** 32 25 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 26 * @param CallType the Type of Executor to generate 33 27 */ 34 #define EXECUTOR_FUNCTIONAL_CREATOR0( ) \35 template<class T> Executor< const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \28 #define EXECUTOR_FUNCTIONAL_CREATOR0(CallType) \ 29 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \ 36 30 { \ 37 return new __EXECUTOR_FUNCTIONAL_NAME(0)<T, const SubString>(functionPointer); \31 return new __EXECUTOR_FUNCTIONAL_NAME(0)<T, CallType>(functionPointer); \ 38 32 } 39 33 40 34 /** 41 35 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 36 * @param CallType the Type of Executor to generate 42 37 * @param type0 for internal usage: the first Argument 43 38 */ 44 #define EXECUTOR_FUNCTIONAL_CREATOR1( type0) \45 template<class T> Executor< const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) \39 #define EXECUTOR_FUNCTIONAL_CREATOR1(CallType, type0) \ 40 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) \ 46 41 { \ 47 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, const SubString, type0>(functionPointer); \42 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, CallType, type0>(functionPointer); \ 48 43 } 49 44 50 45 /** 51 46 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 47 * @param CallType the Type of Executor to generate 52 48 * @param type0 for internal usage: the first Argument 53 49 * @param type1 for internal usage: the second Argument 54 50 */ 55 #define EXECUTOR_FUNCTIONAL_CREATOR2( type0, type1) \56 template<class T> Executor< const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) \51 #define EXECUTOR_FUNCTIONAL_CREATOR2(CallType, type0, type1) \ 52 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) \ 57 53 { \ 58 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, const SubString, type0, type1>(functionPointer); \54 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, CallType, type0, type1>(functionPointer); \ 59 55 } 60 56 61 57 /** 62 58 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 59 * @param CallType the Type of Executor to generate 63 60 * @param type0 for internal usage: the first Argument 64 61 * @param type1 for internal usage: the second Argument 65 62 * @param type2 for internal usage: the third Argument 66 63 */ 67 #define EXECUTOR_FUNCTIONAL_CREATOR3( type0, type1, type2) \68 template<class T> Executor< const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) \64 #define EXECUTOR_FUNCTIONAL_CREATOR3(CallType, type0, type1, type2) \ 65 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) \ 69 66 { \ 70 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, const SubString, type0, type1, type2>(functionPointer); \67 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, CallType, type0, type1, type2>(functionPointer); \ 71 68 } 72 69 73 70 /** 74 71 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 72 * @param CallType the Type of Executor to generate 75 73 * @param type0 for internal usage: the first Argument 76 74 * @param type1 for internal usage: the second Argument … … 78 76 * @param type3 for internal usage: the fourth Argument 79 77 */ 80 #define EXECUTOR_FUNCTIONAL_CREATOR4( type0, type1, type2, type3) \81 template<class T> Executor< const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) \78 #define EXECUTOR_FUNCTIONAL_CREATOR4(CallType, type0, type1, type2, type3) \ 79 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) \ 82 80 { \ 83 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, const SubString, type0, type1, type2, type3>(functionPointer); \81 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, CallType, type0, type1, type2, type3>(functionPointer); \ 84 82 } 85 83 86 84 /** 87 85 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 86 * @param CallType the Type of Executor to generate 88 87 * @param type0 for internal usage: the first Argument 89 88 * @param type1 for internal usage: the second Argument … … 92 91 * @param type4 for internal usage: the fifth Argument 93 92 */ 94 #define EXECUTOR_FUNCTIONAL_CREATOR5( type0, type1, type2, type3, type4) \95 template<class T> Executor< const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) \93 #define EXECUTOR_FUNCTIONAL_CREATOR5(CallType, type0, type1, type2, type3, type4) \ 94 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) \ 96 95 { \ 97 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, const SubString, type0, type1, type2, type3, type4>(functionPointer); \96 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, CallType, type0, type1, type2, type3, type4>(functionPointer); \ 98 97 } 99 98 … … 105 104 #undef FUNCTOR_LIST 106 105 107 108 #undef __EXECUTOR_FUNCTIONAL_NOT_INCLUDE_THIS
Note: See TracChangeset
for help on using the changeset viewer.