Changeset 9732 in orxonox.OLD for branches/new_class_id/src/lib/util/executor/executor_functional.h
- Timestamp:
- Sep 15, 2006, 3:17:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/executor/executor_functional.h
r9731 r9732 61 61 { 62 62 public: 63 ToType operator()(FromType& sub, const MultiType* const defaults)64 { 65 return ( sub.size() > index) ?66 fromString<ToType>( sub[index], getDefault<ToType>(defaults, index)) :63 ToType operator()(FromType& CallValue, const MultiType* const defaults) 64 { 65 return (CallValue.size() > index) ? 66 fromString<ToType>(CallValue[index], getDefault<ToType>(defaults, index)) : 67 67 fromMulti<ToType>(defaults[index]); 68 68 } … … 426 426 */ 427 427 #define EXECUTOR_FUNCTIONAL_CREATOR1(type0) \ 428 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0 ##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \428 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) \ 429 429 { \ 430 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, const SubString, type0 ##_TYPE>(functionPointer); \430 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, const SubString, type0>(functionPointer); \ 431 431 } 432 432 … … 437 437 */ 438 438 #define EXECUTOR_FUNCTIONAL_CREATOR2(type0, type1) \ 439 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0 ##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \439 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) \ 440 440 { \ 441 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, const SubString, type0 ##_TYPE, type1##_TYPE>(functionPointer); \441 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, const SubString, type0, type1>(functionPointer); \ 442 442 } 443 443 … … 449 449 */ 450 450 #define EXECUTOR_FUNCTIONAL_CREATOR3(type0, type1, type2) \ 451 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0 ##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \451 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) \ 452 452 { \ 453 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, const SubString, type0 ##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \453 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, const SubString, type0, type1, type2>(functionPointer); \ 454 454 } 455 455 … … 462 462 */ 463 463 #define EXECUTOR_FUNCTIONAL_CREATOR4(type0, type1, type2, type3) \ 464 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0 ##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \464 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) \ 465 465 { \ 466 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, const SubString, type0 ##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \466 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, const SubString, type0, type1, type2, type3>(functionPointer); \ 467 467 } 468 468 … … 476 476 */ 477 477 #define EXECUTOR_FUNCTIONAL_CREATOR5(type0, type1, type2, type3, type4) \ 478 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) \478 template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) \ 479 479 { \ 480 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, const SubString, type0 ##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE>(functionPointer); \480 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, const SubString, type0, type1, type2, type3, type4>(functionPointer); \ 481 481 } 482 482
Note: See TracChangeset
for help on using the changeset viewer.