Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2006, 4:18:13 PM (19 years ago)
Author:
bensch
Message:

orxonox/gui: executor-with return-type Stage 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/util/executor/executor_functional.h

    r7994 r8033  
    421421 * @brief enables us to easily retrieve an Executor of Class T with modular Argument-count, (without thinking about args at all)
    422422 */
    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) \
     424template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \
    425425{ \
    426426  return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer); \
     
    431431 * @param type0 for internal usage: the first Argument
    432432 */
    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) \
     434template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
    435435{ \
    436436  return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0##_TYPE>(functionPointer); \
     
    442442 * @param type1 for internal usage: the second Argument
    443443 */
    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) \
     445template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
    446446{ \
    447447  return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0##_TYPE, type1##_TYPE>(functionPointer); \
     
    454454 * @param type2 for internal usage: the third Argument
    455455 */
    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) \
     457template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
    458458{ \
    459459  return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \
     
    467467 * @param type3 for internal usage: the fourth Argument
    468468 */
    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) \
     470template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
    471471{ \
    472472  return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \
     
    481481 * @param type4 for internal usage: the fifth Argument
    482482 */
    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) \
     484template<class T> Executor* createExecutor(ret (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
    485485{ \
    486486    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.