Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9745 in orxonox.OLD


Ignore:
Timestamp:
Sep 16, 2006, 2:44:51 PM (18 years ago)
Author:
bensch
Message:

Extension possible now

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  
    2323
    2424/// Define all Constructs, that define an Executor.
    25 
    2625//! The Name to be attached to the functional (for normal, static, and const modes)
    27 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount)   Executor##ParamCount##Params_const
     26#define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext)   Executor##ParamCount##Ext##_const
    2827
    2928//! if Functional is constant calling
  • branches/new_class_id/src/lib/util/executor/executor_generic.h

    r9743 r9745  
    6262//! @brief ExecutorClass, that can execute Functions without any parameters.
    6363template<class T, typename CallType, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject>
    64 class __EXECUTOR_FUNCTIONAL_NAME(0) :public Executor<CallType, BaseClass>
     64class __EXECUTOR_FUNCTIONAL_NAME(0,) :public Executor<CallType, BaseClass>
    6565{
    6666private:
     
    7373   * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function.
    7474   */
    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 )
    7676      : Executor<CallType, BaseClass>(false, __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE)
    7777  {
     
    9595  virtual Executor<CallType, BaseClass>* clone() const
    9696  {
    97     return new __EXECUTOR_FUNCTIONAL_NAME(0)<T, CallType>(this->functionPointer);
     97    return new __EXECUTOR_FUNCTIONAL_NAME(0,)<T, CallType>(this->functionPointer);
    9898  };
    9999};
     
    106106//! @brief ExecutorClass, that can execute Functions with one parameter.
    107107template<class T, typename CallType, typename type0, template<typename> class Evaluater = ExecutorEvaluater, class BaseClass = BaseObject>
    108 class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor<CallType, BaseClass>
     108class __EXECUTOR_FUNCTIONAL_NAME(1,) : public Executor<CallType, BaseClass>
    109109{
    110110private:
     
    117117   * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function.
    118118   */
    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)
    120120      : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE)
    121121  {
     
    140140  virtual Executor<CallType, BaseClass>* clone() const
    141141  {
    142     return  new __EXECUTOR_FUNCTIONAL_NAME(1)<T, CallType, type0>(this->functionPointer);
     142    return  new __EXECUTOR_FUNCTIONAL_NAME(1,)<T, CallType, type0>(this->functionPointer);
    143143  };
    144144};
     
    151151//! @brief ExecutorClass, that can execute Functions with two parameters.
    152152template<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>
     153class __EXECUTOR_FUNCTIONAL_NAME(2,) : public Executor<CallType, BaseClass>
    154154{
    155155private:
     
    162162   * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function.
    163163   */
    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)
    165165      : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE)
    166166  {
     
    186186  virtual Executor<CallType, BaseClass>* clone() const
    187187  {
    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);
    189189  };
    190190};
     
    197197//! @brief ExecutorClass, that can execute Functions with three parameters.
    198198template<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>
     199class __EXECUTOR_FUNCTIONAL_NAME(3,) : public Executor<CallType, BaseClass>
    200200{
    201201private:
     
    208208   * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function.
    209209   */
    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)
    211211      : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE)
    212212  {
     
    233233  virtual Executor<CallType, BaseClass>* clone() const
    234234  {
    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);
    236236  };
    237237};
     
    244244//! @brief ExecutorClass, that can execute Functions with four parameters.
    245245template<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>
     246class __EXECUTOR_FUNCTIONAL_NAME(4,) : public Executor<CallType, BaseClass>
    247247{
    248248private:
     
    255255   * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function.
    256256   */
    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)
    258258      : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE)
    259259  {
     
    281281  virtual Executor<CallType, BaseClass>* clone() const
    282282  {
    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);
    284284  };
    285285};
     
    292292//! @brief ExecutorClass, that can execute Functions with five parameters.
    293293template<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>
     294class __EXECUTOR_FUNCTIONAL_NAME(5,) : public Executor<CallType, BaseClass>
    295295{
    296296private:
     
    303303   * @param __EXECUTOR_FUNCTIONAL_FUNCTION_POINTER the FunctionPointer to the Calling Function.
    304304   */
    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)
    306306      : Executor<CallType, BaseClass>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>(), __EXECUTOR_FUNCTIONAL_FUNCTIONTYPE)
    307307  {
     
    330330  virtual Executor<CallType, BaseClass>* clone() const
    331331  {
    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);
    333333  };
    334334};
  • branches/new_class_id/src/lib/util/executor/executor_lua_state.h

    r9743 r9745  
    2727#include "executor_generic.h"
    2828#include "luaincl.h"
     29#ifdef FUNCTOR_CALL_TYPE
     30 #undef FUNCTOR_CALL_TYPE
     31#endif
     32#define FUNCTOR_CALL_TYPE lua_State*
     33
    2934
    3035template<typename type> type fromLua(lua_State* state, int index);
  • branches/new_class_id/src/lib/util/executor/executor_member.h

    r9740 r9745  
    2424/// Define all Constructs, that define an Executor.
    2525//! The Name to be attached to the functional (for normal, static, and const modes)
    26 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount)   Executor##ParamCount##Params
     26#define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext)   Executor##ParamCount##Ext
    2727//! if Functional is constant calling
    2828#define __EXECUTOR_FUNCTIONAL_CONST
  • branches/new_class_id/src/lib/util/executor/executor_static.h

    r9740 r9745  
    2525
    2626//! The Name to be attached to the functional (for normal, static, and const modes)
    27 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount)   Executor##ParamCount##Params_static
     27#define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext)   Executor##ParamCount##Ext##_static
    2828
    2929//! if Functional is constant calling
  • branches/new_class_id/src/lib/util/executor/executor_substring.h

    r9742 r9745  
    2727#include "executor_generic.h"
    2828#include "substring.h"
    29 
     29#ifdef FUNCTOR_CALL_TYPE
     30 #undef FUNCTOR_CALL_TYPE
     31#endif
     32#define FUNCTOR_CALL_TYPE const SubString
    3033
    3134template<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  
    2424
    2525#include "executor_const_member.h"
    26 #include "substring.h"
    27 
    28 #define FUNCTOR_CALL_TYPE const SubString
    2926
    3027/// Define all Constructs, that define an Executor.
    31 
    3228//! The Name to be attached to the functional (for normal, static, and const modes)
    33 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount)   Executor##ParamCount##Params_const
     29#define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext)   Executor##ParamCount##Ext##_const
    3430//! if Functional is constant calling
    3531#define __EXECUTOR_FUNCTIONAL_CONST              const
  • branches/new_class_id/src/lib/util/executor/functor_generic.h

    r9740 r9745  
    2929template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \
    3030{ \
    31   return new __EXECUTOR_FUNCTIONAL_NAME(0)<T, CallType>(functionPointer); \
     31  return new __EXECUTOR_FUNCTIONAL_NAME(0,)<T, CallType>(functionPointer); \
    3232}
    3333
     
    4040template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST) \
    4141{ \
    42   return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, CallType, type0>(functionPointer); \
     42  return new __EXECUTOR_FUNCTIONAL_NAME(1,)<T, CallType, type0>(functionPointer); \
    4343}
    4444
     
    5252template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST) \
    5353{ \
    54   return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, CallType, type0, type1>(functionPointer); \
     54  return new __EXECUTOR_FUNCTIONAL_NAME(2,)<T, CallType, type0, type1>(functionPointer); \
    5555}
    5656
     
    6565template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST) \
    6666{ \
    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); \
    6868}
    6969
     
    7979template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST) \
    8080{ \
    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); \
    8282}
    8383
     
    9494template<class T> Executor<CallType>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST) \
    9595{ \
    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); \
    9797}
    9898
  • branches/new_class_id/src/lib/util/executor/functor_member.h

    r9740 r9745  
    2424
    2525#include "executor_member.h"
    26 #include "substring.h"
    27 
    28 #define FUNCTOR_CALL_TYPE const SubString
    2926
    3027/// Define all Constructs, that define an Executor.
    31 
    3228//! The Name to be attached to the functional (for normal, static, and const modes)
    33 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount)   Executor##ParamCount##Params
     29#define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext)   Executor##ParamCount##Ext
    3430//! if Functional is constant calling
    3531#define __EXECUTOR_FUNCTIONAL_CONST
  • branches/new_class_id/src/lib/util/executor/functor_static.h

    r9740 r9745  
    2424
    2525#include "executor_static.h"
    26 #include "substring.h"
    27 
    28 #define FUNCTOR_CALL_TYPE const SubString
    2926
    3027/// Define all Constructs, that define an Executor.
    31 
    3228//! The Name to be attached to the functional (for normal, static, and const modes)
    33 #define __EXECUTOR_FUNCTIONAL_NAME(ParamCount)   Executor##ParamCount##Params_static
     29#define __EXECUTOR_FUNCTIONAL_NAME(ParamCount, Ext)   Executor##ParamCount##Ext##_static
    3430//! if Functional is constant calling
    3531#define __EXECUTOR_FUNCTIONAL_CONST
Note: See TracChangeset for help on using the changeset viewer.