Changeset 8033 in orxonox.OLD for branches/gui/src/lib/util
- Timestamp:
- May 31, 2006, 4:18:13 PM (19 years ago)
- Location:
- branches/gui/src/lib/util/executor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/util/executor/executor_functional.h
r7994 r8033 421 421 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all) 422 422 */ 423 #define EXECUTOR_FUNCTIONAL_CREATOR0( ) \424 template<class T> Executor* createExecutor( void(__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \423 #define EXECUTOR_FUNCTIONAL_CREATOR0(ret) \ 424 template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \ 425 425 { \ 426 426 return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer); \ … … 431 431 * @param type0 for internal usage: the first Argument 432 432 */ 433 #define EXECUTOR_FUNCTIONAL_CREATOR1( type0) \434 template<class T> Executor* createExecutor( void(__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \433 #define EXECUTOR_FUNCTIONAL_CREATOR1(ret, type0) \ 434 template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 435 435 { \ 436 436 return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0##_TYPE>(functionPointer); \ … … 442 442 * @param type1 for internal usage: the second Argument 443 443 */ 444 #define EXECUTOR_FUNCTIONAL_CREATOR2( type0, type1) \445 template<class T> Executor* createExecutor( void(__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \444 #define EXECUTOR_FUNCTIONAL_CREATOR2(ret, type0, type1) \ 445 template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 446 446 { \ 447 447 return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0##_TYPE, type1##_TYPE>(functionPointer); \ … … 454 454 * @param type2 for internal usage: the third Argument 455 455 */ 456 #define EXECUTOR_FUNCTIONAL_CREATOR3( type0, type1, type2) \457 template<class T> Executor* createExecutor( void(__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \456 #define EXECUTOR_FUNCTIONAL_CREATOR3(ret, type0, type1, type2) \ 457 template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 458 458 { \ 459 459 return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \ … … 467 467 * @param type3 for internal usage: the fourth Argument 468 468 */ 469 #define EXECUTOR_FUNCTIONAL_CREATOR4( type0, type1, type2, type3) \470 template<class T> Executor* createExecutor( void(__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \469 #define EXECUTOR_FUNCTIONAL_CREATOR4(ret, type0, type1, type2, type3) \ 470 template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 471 471 { \ 472 472 return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \ … … 481 481 * @param type4 for internal usage: the fifth Argument 482 482 */ 483 #define EXECUTOR_FUNCTIONAL_CREATOR5( type0, type1, type2, type3, type4) \484 template<class T> Executor* createExecutor( void(__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \483 #define EXECUTOR_FUNCTIONAL_CREATOR5(ret, type0, type1, type2, type3, type4) \ 484 template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \ 485 485 { \ 486 486 return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE>(functionPointer); \ -
branches/gui/src/lib/util/executor/functor_list.h
r7785 r8033 90 90 #ifdef FUNCTOR_LIST 91 91 92 FUNCTOR_LIST(0)( );92 FUNCTOR_LIST(0)(void); 93 93 //! makes functions with one string 94 FUNCTOR_LIST(1)( l_STRING);94 FUNCTOR_LIST(1)(void, l_STRING); 95 95 //! makes functions with two strings 96 FUNCTOR_LIST(2)( l_STRING, l_STRING);96 FUNCTOR_LIST(2)(void, l_STRING, l_STRING); 97 97 //! makes functions with three strings 98 FUNCTOR_LIST(3)( l_STRING, l_STRING, l_STRING);98 FUNCTOR_LIST(3)(void, l_STRING, l_STRING, l_STRING); 99 99 //! makes functions with four strings 100 FUNCTOR_LIST(4)( l_STRING, l_STRING, l_STRING, l_STRING);100 FUNCTOR_LIST(4)(void, l_STRING, l_STRING, l_STRING, l_STRING); 101 101 102 102 103 103 //! makes functions with one bool 104 FUNCTOR_LIST(1)( l_BOOL);104 FUNCTOR_LIST(1)(void, l_BOOL); 105 105 106 106 //! makes functions with one int 107 FUNCTOR_LIST(1)( l_INT);107 FUNCTOR_LIST(1)(void, l_INT); 108 108 //! makes functions with two ints 109 FUNCTOR_LIST(2)( l_INT, l_INT);109 FUNCTOR_LIST(2)(void, l_INT, l_INT); 110 110 //! makes functions with three ints 111 FUNCTOR_LIST(3)( l_INT, l_INT, l_INT);111 FUNCTOR_LIST(3)(void, l_INT, l_INT, l_INT); 112 112 //! makes functions with four ints 113 FUNCTOR_LIST(4)( l_INT, l_INT, l_INT, l_INT);113 FUNCTOR_LIST(4)(void, l_INT, l_INT, l_INT, l_INT); 114 114 115 115 116 116 //! makes functions with one unsigned int 117 FUNCTOR_LIST(1)( l_UINT);117 FUNCTOR_LIST(1)(void, l_UINT); 118 118 //! makes functions with two unsigned ints 119 FUNCTOR_LIST(2)( l_UINT, l_UINT);119 FUNCTOR_LIST(2)(void, l_UINT, l_UINT); 120 120 //! makes functions with three unsigned ints 121 FUNCTOR_LIST(3)( l_UINT, l_UINT, l_UINT);121 FUNCTOR_LIST(3)(void, l_UINT, l_UINT, l_UINT); 122 122 //! makes functions with four unsigned ints 123 FUNCTOR_LIST(4)( l_UINT, l_UINT, l_UINT, l_UINT);123 FUNCTOR_LIST(4)(void, l_UINT, l_UINT, l_UINT, l_UINT); 124 124 125 125 //! makes functions with one float 126 FUNCTOR_LIST(1)( l_FLOAT);126 FUNCTOR_LIST(1)(void, l_FLOAT); 127 127 //! makes functions with two floats 128 FUNCTOR_LIST(2)( l_FLOAT, l_FLOAT);128 FUNCTOR_LIST(2)(void, l_FLOAT, l_FLOAT); 129 129 //! makes functions with three floats 130 FUNCTOR_LIST(3)( l_FLOAT, l_FLOAT, l_FLOAT);130 FUNCTOR_LIST(3)(void, l_FLOAT, l_FLOAT, l_FLOAT); 131 131 //! makes functions with four floats 132 FUNCTOR_LIST(4)( l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT);132 FUNCTOR_LIST(4)(void, l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT); 133 133 //! makes functions with four floats 134 FUNCTOR_LIST(5)( l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT);134 FUNCTOR_LIST(5)(void, l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT); 135 135 136 136 //! mixed values: 137 FUNCTOR_LIST(2)( l_STRING, l_FLOAT);138 FUNCTOR_LIST(2)( l_UINT, l_LONG);139 FUNCTOR_LIST(2)( l_STRING, l_UINT);137 FUNCTOR_LIST(2)(void, l_STRING, l_FLOAT); 138 FUNCTOR_LIST(2)(void, l_UINT, l_LONG); 139 FUNCTOR_LIST(2)(void, l_STRING, l_UINT); 140 140 141 FUNCTOR_LIST(3)( l_STRING, l_FLOAT, l_UINT);142 FUNCTOR_LIST(4)( l_STRING, l_FLOAT, l_UINT, l_UINT);143 FUNCTOR_LIST(3)( l_STRING, l_INT, l_UINT);144 FUNCTOR_LIST(3)( l_STRING, l_UINT, l_UINT);141 FUNCTOR_LIST(3)(void, l_STRING, l_FLOAT, l_UINT); 142 FUNCTOR_LIST(4)(void, l_STRING, l_FLOAT, l_UINT, l_UINT); 143 FUNCTOR_LIST(3)(void, l_STRING, l_INT, l_UINT); 144 FUNCTOR_LIST(3)(void, l_STRING, l_UINT, l_UINT); 145 145 146 146 #endif /* FUNCTOR_LIST */
Note: See TracChangeset
for help on using the changeset viewer.