Changeset 9727 in orxonox.OLD for branches/new_class_id/src/lib/util/executor/executor_functional.h
- Timestamp:
- Sep 14, 2006, 5:24:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/executor/executor_functional.h
r9406 r9727 94 94 /////////// 95 95 //! @brief ExecutorClass, that can execute Functions without any parameters. 96 template<class T> class __EXECUTOR_FUNCTIONAL_NAME(0) : public Executor 96 template<class T> class __EXECUTOR_FUNCTIONAL_NAME(0) : public Executor<const SubString> 97 97 { 98 98 private: … … 106 106 */ 107 107 __EXECUTOR_FUNCTIONAL_NAME(0) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST ) 108 : Executor ()108 : Executor<const SubString>(false) 109 109 { 110 110 this->functorType = Executor_Objective; … … 132 132 * @returns a new Executor that's a copy of this one. 133 133 */ 134 virtual Executor * clone() const134 virtual Executor<const SubString>* clone() const 135 135 { 136 136 return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(this->functionPointer); … … 144 144 /////////// 145 145 //! @brief ExecutorClass, that can execute Functions with one parameter. 146 template<class T, typename type0> class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor 146 template<class T, typename type0> class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor<const SubString> 147 147 { 148 148 private: … … 156 156 */ 157 157 __EXECUTOR_FUNCTIONAL_NAME(1) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) 158 : Executor (ExecutorParamType<type0>())158 : Executor<const SubString>(false, ExecutorParamType<type0>()) 159 159 { 160 160 this->functorType = Executor_Objective; … … 186 186 * @returns a new Executor that's a copy of this one. 187 187 */ 188 virtual Executor * clone() const188 virtual Executor<const SubString>* clone() const 189 189 { 190 190 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0>(this->functionPointer); … … 196 196 /////////// 197 197 //! @brief ExecutorClass, that can execute Functions with two parameters. 198 template<class T, typename type0, typename type1> class __EXECUTOR_FUNCTIONAL_NAME(2) : public Executor 198 template<class T, typename type0, typename type1> class __EXECUTOR_FUNCTIONAL_NAME(2) : public Executor<const SubString> 199 199 { 200 200 private: … … 208 208 */ 209 209 __EXECUTOR_FUNCTIONAL_NAME(2) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) 210 : Executor (ExecutorParamType<type0>(), ExecutorParamType<type1>())210 : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>()) 211 211 { 212 212 this->functorType = Executor_Objective; … … 239 239 * @returns a new Executor that's a copy of this one. 240 240 */ 241 virtual Executor * clone() const241 virtual Executor<const SubString>* clone() const 242 242 { 243 243 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0, type1>(this->functionPointer); … … 250 250 /////////// 251 251 //! @brief ExecutorClass, that can execute Functions with three parameters. 252 template<class T, typename type0, typename type1, typename type2> class __EXECUTOR_FUNCTIONAL_NAME(3) : public Executor 252 template<class T, typename type0, typename type1, typename type2> class __EXECUTOR_FUNCTIONAL_NAME(3) : public Executor<const SubString> 253 253 { 254 254 private: … … 262 262 */ 263 263 __EXECUTOR_FUNCTIONAL_NAME(3) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) 264 : Executor (ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())264 : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>()) 265 265 { 266 266 this->functorType = Executor_Objective; … … 295 295 * @returns a new Executor that's a copy of this one. 296 296 */ 297 virtual Executor * clone() const297 virtual Executor<const SubString>* clone() const 298 298 { 299 299 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0, type1, type2>(this->functionPointer); … … 307 307 /////////// 308 308 //! @brief ExecutorClass, that can execute Functions with four parameters. 309 template<class T, typename type0, typename type1, typename type2, typename type3> class __EXECUTOR_FUNCTIONAL_NAME(4) : public Executor 309 template<class T, typename type0, typename type1, typename type2, typename type3> class __EXECUTOR_FUNCTIONAL_NAME(4) : public Executor<const SubString> 310 310 { 311 311 private: … … 319 319 */ 320 320 __EXECUTOR_FUNCTIONAL_NAME(4) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) 321 : Executor (ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())321 : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>()) 322 322 { 323 323 this->functorType = Executor_Objective; … … 354 354 * @returns a new Executor that's a copy of this one. 355 355 */ 356 virtual Executor * clone() const356 virtual Executor<const SubString>* clone() const 357 357 { 358 358 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0, type1, type2, type3>(this->functionPointer); … … 366 366 /////////// 367 367 //! @brief ExecutorClass, that can execute Functions with five parameters. 368 template<class T, typename type0, typename type1, typename type2, typename type3, typename type4> class __EXECUTOR_FUNCTIONAL_NAME(5) : public Executor 368 template<class T, typename type0, typename type1, typename type2, typename type3, typename type4> class __EXECUTOR_FUNCTIONAL_NAME(5) : public Executor<const SubString> 369 369 { 370 370 private: … … 378 378 */ 379 379 __EXECUTOR_FUNCTIONAL_NAME(5) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) 380 : Executor (ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())380 : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>()) 381 381 { 382 382 this->functorType = Executor_Objective; … … 415 415 * @returns a new Executor that's a copy of this one. 416 416 */ 417 virtual Executor * clone() const417 virtual Executor<const SubString>* clone() const 418 418 { 419 419 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0, type1, type2, type3, type4>(this->functionPointer); … … 427 427 */ 428 428 #define EXECUTOR_FUNCTIONAL_CREATOR0() \ 429 template<class T> Executor * createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \429 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \ 430 430 { \ 431 431 return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer); \ … … 437 437 */ 438 438 #define EXECUTOR_FUNCTIONAL_CREATOR1(type0) \ 439 template<class T> Executor * createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \439 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 440 440 { \ 441 441 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0##_TYPE>(functionPointer); \ … … 448 448 */ 449 449 #define EXECUTOR_FUNCTIONAL_CREATOR2(type0, type1) \ 450 template<class T> Executor * createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \450 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 451 451 { \ 452 452 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0##_TYPE, type1##_TYPE>(functionPointer); \ … … 460 460 */ 461 461 #define EXECUTOR_FUNCTIONAL_CREATOR3(type0, type1, type2) \ 462 template<class T> Executor * createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \462 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 463 463 { \ 464 464 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \ … … 473 473 */ 474 474 #define EXECUTOR_FUNCTIONAL_CREATOR4(type0, type1, type2, type3) \ 475 template<class T> Executor * createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \475 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 476 476 { \ 477 477 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \ … … 487 487 */ 488 488 #define EXECUTOR_FUNCTIONAL_CREATOR5(type0, type1, type2, type3, type4) \ 489 template<class T> Executor * createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \489 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 490 490 { \ 491 491 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE>(functionPointer); \
Note: See TracChangeset
for help on using the changeset viewer.