Changeset 5636 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Nov 18, 2005, 6:55:18 PM (19 years ago)
- Location:
- trunk/src/lib/util/executor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/executor/executor.cc
r5635 r5636 38 38 * @param paramCount the count of parameters this command takes 39 39 */ 40 Executor::Executor( const char* commandName, const char* className,unsigned int paramCount, ...)40 Executor::Executor(unsigned int paramCount, ...) 41 41 { 42 42 this->setClassID(CL_EXECUTOR, "Executor"); 43 this->setName(commandName);44 43 45 // this->classID = classID;46 // handling parameters, and storing them:47 44 if (paramCount > FUNCTOR_MAX_ARGUMENTS) 48 45 paramCount = FUNCTOR_MAX_ARGUMENTS; -
trunk/src/lib/util/executor/executor.h
r5635 r5636 41 41 42 42 protected: 43 Executor( const char* commandName, const char* className,unsigned int paramCount, ...);43 Executor(unsigned int paramCount, ...); 44 44 ~Executor(); 45 45 … … 77 77 // COMMAND REGISTRATION // 78 78 ////////////////////////// 79 // EXECUTOR can be redefined as Executor or ExecutorStatic80 // EXECUTOREXECUTER can be redefined too.79 // EXECUTOR can be redefined as Executor or ExecutorStatic 80 // EXECUTOREXECUTER can be redefined too. 81 81 // EXECUTORINCLASS 82 82 // EXECUTORTYPE 83 83 84 84 85 /////////////////////// … … 111 112 //! creates a command that takes no parameters 112 113 #define ExecutorConstructor0() \ 113 EXECUTOR( const char* commandName, const char* className,void EXECUTORINCLASS(*function)()) \114 : Executor( commandName, className,0) \114 EXECUTOR(void EXECUTORINCLASS(*function)()) \ 115 : Executor(0) \ 115 116 { \ 116 117 this->functorType = EXECUTORTYPE; \ … … 120 121 //! creates a command that takes one parameter 121 122 #define ExecutorConstructor1(t1) \ 122 EXECUTOR( const char* commandName, const char* className,void EXECUTORINCLASS(*function)(t1##_TYPE)) \123 : Executor( commandName, className,1, t1##_PARAM) \123 EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE)) \ 124 : Executor(1, t1##_PARAM) \ 124 125 { \ 125 126 this->functorType = EXECUTORTYPE; \ … … 129 130 //! creates a command that takes two parameters 130 131 #define ExecutorConstructor2(t1,t2) \ 131 EXECUTOR( const char* commandName, const char* className,void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE)) \132 : Executor( commandName, className,2, t1##_PARAM, t2##_PARAM) \132 EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE)) \ 133 : Executor(2, t1##_PARAM, t2##_PARAM) \ 133 134 { \ 134 135 this->functorType = EXECUTORTYPE; \ … … 138 139 //! creates a command that takes three parameter 139 140 #define ExecutorConstructor3(t1,t2,t3) \ 140 EXECUTOR( const char* commandName, const char* className,void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE)) \141 : Executor( commandName, className,3, t1##_PARAM, t2##_PARAM, t3##_PARAM) \141 EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE)) \ 142 : Executor(3, t1##_PARAM, t2##_PARAM, t3##_PARAM) \ 142 143 { \ 143 144 this->functorType = EXECUTORTYPE; \ … … 147 148 //! creates a command that takes four parameter 148 149 #define ExecutorConstructor4(t1,t2,t3,t4) \ 149 EXECUTOR( const char* commandName, const char* className,void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE)) \150 : Executor( commandName, className,4, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM) \150 EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE)) \ 151 : Executor(4, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM) \ 151 152 { \ 152 153 this->functorType = EXECUTORTYPE; \ … … 156 157 //! creates a command that takes five parameter 157 158 #define ExecutorConstructor5(t1,t2,t3,t4,t5) \ 158 EXECUTOR( const char* commandName, const char* className,void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE)) \159 : Executor( commandName, className,5, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM) \159 EXECUTOR(void EXECUTORINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE)) \ 160 : Executor(5, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM) \ 160 161 { \ 161 162 this->functorType = EXECUTORTYPE; \ … … 292 293 293 294 294 virtual void execute Command(BaseObject* object, const char* parameters)295 virtual void execute (BaseObject* object, const char* parameters) 295 296 { 296 297 SubString sub(parameters, true);
Note: See TracChangeset
for help on using the changeset viewer.