Changeset 9745 in orxonox.OLD for branches/new_class_id/src
- Timestamp:
- Sep 16, 2006, 2:44:51 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util/executor
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/executor/executor_const_member.h
r9740 r9745 23 23 24 24 /// Define all Constructs, that define an Executor. 25 26 25 //! The Name to be attached to the functional (for normal, static, and const modes) 27 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount ) Executor##ParamCount##Params_const26 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext) Executor##ParamCount##Ext##_const 28 27 29 28 //! if Functional is constant calling -
branches/new_class_id/src/lib/util/executor/executor_generic.h
r9743 r9745 62 62 //! @brief ExecutorClass, that can execute Functions without any parameters. 63 63 template<class T, typename CallType, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject> 64 class __EXECUTOR_FUNCTIONAL_NAME(0 ) :public Executor<CallType, BaseClass>64 class __EXECUTOR_FUNCTIONAL_NAME(0,) :public Executor<CallType, BaseClass> 65 65 { 66 66 private: … … 73 73 * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function. 74 74 */ 75 __EXECUTOR_FUNCTIONAL_NAME(0 ) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST )75 __EXECUTOR_FUNCTIONAL_NAME(0,) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST ) 76 76 : Executor<CallType, BaseClass>(false, __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE) 77 77 { … … 95 95 virtual Executor<CallType, BaseClass>* clone() const 96 96 { 97 return new __EXECUTOR_FUNCTIONAL_NAME(0 )<T, CallType>(this->functionPointer);97 return new __EXECUTOR_FUNCTIONAL_NAME(0,)<T, CallType>(this->functionPointer); 98 98 }; 99 99 }; … … 106 106 //! @brief ExecutorClass, that can execute Functions with one parameter. 107 107 template<class T, typename CallType, typename type0, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject> 108 class __EXECUTOR_FUNCTIONAL_NAME(1 ) : public Executor<CallType, BaseClass>108 class __EXECUTOR_FUNCTIONAL_NAME(1,) : public Executor<CallType, BaseClass> 109 109 { 110 110 private: … … 117 117 * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function. 118 118 */ 119 __EXECUTOR_FUNCTIONAL_NAME(1 ) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST)119 __EXECUTOR_FUNCTIONAL_NAME(1,) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) 120 120 : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE) 121 121 { … … 140 140 virtual Executor<CallType, BaseClass>* clone() const 141 141 { 142 return new __EXECUTOR_FUNCTIONAL_NAME(1 )<T, CallType, type0>(this->functionPointer);142 return new __EXECUTOR_FUNCTIONAL_NAME(1,)<T, CallType, type0>(this->functionPointer); 143 143 }; 144 144 }; … … 151 151 //! @brief ExecutorClass, that can execute Functions with two parameters. 152 152 template<class T, typename CallType, typename type0, typename type1, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject> 153 class __EXECUTOR_FUNCTIONAL_NAME(2 ) : public Executor<CallType, BaseClass>153 class __EXECUTOR_FUNCTIONAL_NAME(2,) : public Executor<CallType, BaseClass> 154 154 { 155 155 private: … … 162 162 * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function. 163 163 */ 164 __EXECUTOR_FUNCTIONAL_NAME(2 ) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST)164 __EXECUTOR_FUNCTIONAL_NAME(2,) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) 165 165 : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE) 166 166 { … … 186 186 virtual Executor<CallType, BaseClass>* clone() const 187 187 { 188 return new __EXECUTOR_FUNCTIONAL_NAME(2 )<T, CallType, type0, type1>(this->functionPointer);188 return new __EXECUTOR_FUNCTIONAL_NAME(2,)<T, CallType, type0, type1>(this->functionPointer); 189 189 }; 190 190 }; … … 197 197 //! @brief ExecutorClass, that can execute Functions with three parameters. 198 198 template<class T, typename CallType, typename type0, typename type1, typename type2, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject> 199 class __EXECUTOR_FUNCTIONAL_NAME(3 ) : public Executor<CallType, BaseClass>199 class __EXECUTOR_FUNCTIONAL_NAME(3,) : public Executor<CallType, BaseClass> 200 200 { 201 201 private: … … 208 208 * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function. 209 209 */ 210 __EXECUTOR_FUNCTIONAL_NAME(3 ) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST)210 __EXECUTOR_FUNCTIONAL_NAME(3,) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) 211 211 : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE) 212 212 { … … 233 233 virtual Executor<CallType, BaseClass>* clone() const 234 234 { 235 return new __EXECUTOR_FUNCTIONAL_NAME(3 )<T, CallType, type0, type1, type2>(this->functionPointer);235 return new __EXECUTOR_FUNCTIONAL_NAME(3,)<T, CallType, type0, type1, type2>(this->functionPointer); 236 236 }; 237 237 }; … … 244 244 //! @brief ExecutorClass, that can execute Functions with four parameters. 245 245 template<class T, typename CallType, typename type0, typename type1, typename type2, typename type3, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject> 246 class __EXECUTOR_FUNCTIONAL_NAME(4 ) : public Executor<CallType, BaseClass>246 class __EXECUTOR_FUNCTIONAL_NAME(4,) : public Executor<CallType, BaseClass> 247 247 { 248 248 private: … … 255 255 * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function. 256 256 */ 257 __EXECUTOR_FUNCTIONAL_NAME(4 ) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST)257 __EXECUTOR_FUNCTIONAL_NAME(4,) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) 258 258 : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE) 259 259 { … … 281 281 virtual Executor<CallType, BaseClass>* clone() const 282 282 { 283 return new __EXECUTOR_FUNCTIONAL_NAME(4 )<T, CallType, type0, type1, type2, type3>(this->functionPointer);283 return new __EXECUTOR_FUNCTIONAL_NAME(4,)<T, CallType, type0, type1, type2, type3>(this->functionPointer); 284 284 }; 285 285 }; … … 292 292 //! @brief ExecutorClass, that can execute Functions with five parameters. 293 293 template<class T, typename CallType, typename type0, typename type1, typename type2, typename type3, typename type4, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject> 294 class __EXECUTOR_FUNCTIONAL_NAME(5 ) : public Executor<CallType, BaseClass>294 class __EXECUTOR_FUNCTIONAL_NAME(5,) : public Executor<CallType, BaseClass> 295 295 { 296 296 private: … … 303 303 * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function. 304 304 */ 305 __EXECUTOR_FUNCTIONAL_NAME(5 ) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST)305 __EXECUTOR_FUNCTIONAL_NAME(5,) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) 306 306 : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE) 307 307 { … … 330 330 virtual Executor<CallType, BaseClass>* clone() const 331 331 { 332 return new __EXECUTOR_FUNCTIONAL_NAME(5 )<T, CallType, type0, type1, type2, type3, type4>(this->functionPointer);332 return new __EXECUTOR_FUNCTIONAL_NAME(5,)<T, CallType, type0, type1, type2, type3, type4>(this->functionPointer); 333 333 }; 334 334 }; -
branches/new_class_id/src/lib/util/executor/executor_lua_state.h
r9743 r9745 27 27 #include "executor_generic.h" 28 28 #include "luaincl.h" 29 #ifdef FUNCTOR_CALL_TYPE 30 #undef FUNCTOR_CALL_TYPE 31 #endif 32 #define FUNCTOR_CALL_TYPE lua_State* 33 29 34 30 35 template<typename type> type fromLua(lua_State* state, int index); -
branches/new_class_id/src/lib/util/executor/executor_member.h
r9740 r9745 24 24 /// Define all Constructs, that define an Executor. 25 25 //! The Name to be attached to the functional (for normal, static, and const modes) 26 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount ) Executor##ParamCount##Params26 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext) Executor##ParamCount##Ext 27 27 //! if Functional is constant calling 28 28 #define __EXECUTOR_FUNCTIONAL_CONST -
branches/new_class_id/src/lib/util/executor/executor_static.h
r9740 r9745 25 25 26 26 //! The Name to be attached to the functional (for normal, static, and const modes) 27 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount ) Executor##ParamCount##Params_static27 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext) Executor##ParamCount##Ext##_static 28 28 29 29 //! if Functional is constant calling -
branches/new_class_id/src/lib/util/executor/executor_substring.h
r9742 r9745 27 27 #include "executor_generic.h" 28 28 #include "substring.h" 29 29 #ifdef FUNCTOR_CALL_TYPE 30 #undef FUNCTOR_CALL_TYPE 31 #endif 32 #define FUNCTOR_CALL_TYPE const SubString 30 33 31 34 template<typename type> type fromString(const std::string& input, type defaultValue) { return defaultValue; }; -
branches/new_class_id/src/lib/util/executor/functor_const_member.h
r9740 r9745 24 24 25 25 #include "executor_const_member.h" 26 #include "substring.h"27 28 #define FUNCTOR_CALL_TYPE const SubString29 26 30 27 /// Define all Constructs, that define an Executor. 31 32 28 //! The Name to be attached to the functional (for normal, static, and const modes) 33 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount ) Executor##ParamCount##Params_const29 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext) Executor##ParamCount##Ext##_const 34 30 //! if Functional is constant calling 35 31 #define __EXECUTOR_FUNCTIONAL_CONST const -
branches/new_class_id/src/lib/util/executor/functor_generic.h
r9740 r9745 29 29 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \ 30 30 { \ 31 return new __EXECUTOR_FUNCTIONAL_NAME(0 )<T, CallType>(functionPointer); \31 return new __EXECUTOR_FUNCTIONAL_NAME(0,)<T, CallType>(functionPointer); \ 32 32 } 33 33 … … 40 40 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) \ 41 41 { \ 42 return new __EXECUTOR_FUNCTIONAL_NAME(1 )<T, CallType, type0>(functionPointer); \42 return new __EXECUTOR_FUNCTIONAL_NAME(1,)<T, CallType, type0>(functionPointer); \ 43 43 } 44 44 … … 52 52 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) \ 53 53 { \ 54 return new __EXECUTOR_FUNCTIONAL_NAME(2 )<T, CallType, type0, type1>(functionPointer); \54 return new __EXECUTOR_FUNCTIONAL_NAME(2,)<T, CallType, type0, type1>(functionPointer); \ 55 55 } 56 56 … … 65 65 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) \ 66 66 { \ 67 return new __EXECUTOR_FUNCTIONAL_NAME(3 )<T, CallType, type0, type1, type2>(functionPointer); \67 return new __EXECUTOR_FUNCTIONAL_NAME(3,)<T, CallType, type0, type1, type2>(functionPointer); \ 68 68 } 69 69 … … 79 79 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) \ 80 80 { \ 81 return new __EXECUTOR_FUNCTIONAL_NAME(4 )<T, CallType, type0, type1, type2, type3>(functionPointer); \81 return new __EXECUTOR_FUNCTIONAL_NAME(4,)<T, CallType, type0, type1, type2, type3>(functionPointer); \ 82 82 } 83 83 … … 94 94 template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) \ 95 95 { \ 96 return new __EXECUTOR_FUNCTIONAL_NAME(5 )<T, CallType, type0, type1, type2, type3, type4>(functionPointer); \96 return new __EXECUTOR_FUNCTIONAL_NAME(5,)<T, CallType, type0, type1, type2, type3, type4>(functionPointer); \ 97 97 } 98 98 -
branches/new_class_id/src/lib/util/executor/functor_member.h
r9740 r9745 24 24 25 25 #include "executor_member.h" 26 #include "substring.h"27 28 #define FUNCTOR_CALL_TYPE const SubString29 26 30 27 /// Define all Constructs, that define an Executor. 31 32 28 //! The Name to be attached to the functional (for normal, static, and const modes) 33 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount ) Executor##ParamCount##Params29 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext) Executor##ParamCount##Ext 34 30 //! if Functional is constant calling 35 31 #define __EXECUTOR_FUNCTIONAL_CONST -
branches/new_class_id/src/lib/util/executor/functor_static.h
r9740 r9745 24 24 25 25 #include "executor_static.h" 26 #include "substring.h"27 28 #define FUNCTOR_CALL_TYPE const SubString29 26 30 27 /// Define all Constructs, that define an Executor. 31 32 28 //! The Name to be attached to the functional (for normal, static, and const modes) 33 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount ) Executor##ParamCount##Params_static29 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext) Executor##ParamCount##Ext##_static 34 30 //! if Functional is constant calling 35 31 #define __EXECUTOR_FUNCTIONAL_CONST
Note: See TracChangeset
for help on using the changeset viewer.