Changeset 7200 in orxonox.OLD for trunk/src/lib/util/executor
- Timestamp:
- Mar 9, 2006, 2:43:47 AM (19 years ago)
- Location:
- trunk/src/lib/util/executor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/executor/executor.cc
r7199 r7200 108 108 { 109 109 if (*value[i] != MT_NULL) 110 this->defaultValue[i].setValueOf(*value[i]); 110 { 111 // printf("1:::: %s\n", MultiType::MultiTypeToString(this->defaultValue[i].getType())); 112 //this->defaultValue[i].debug(); 113 this->defaultValue[i].setValueOf(*value[i]); 114 //printf("2::::%s\n", MultiType::MultiTypeToString(this->defaultValue[i].getType())); 115 //this->defaultValue[i].debug(); 116 //this->defaultValue[i].setValueOf(*value[i]); 117 } 111 118 } 112 119 return this; -
trunk/src/lib/util/executor/executor.h
r7199 r7200 189 189 //! execute-macro for functions with one parameter 190 190 #define ExecutorExecute1(t1) \ 191 else if (this->paramCount == 1 && this->defaultValue[0] .getType()== t1##_PARAM) \191 else if (this->paramCount == 1 && this->defaultValue[0] == t1##_PARAM) \ 192 192 EXECUTOREXECUTER(_1_##t1)(t1##_FUNC((const char*)parameters, t1##_DEFGRAB(0))) 193 193 194 194 //! execute-macro for functions with two parameters 195 195 #define ExecutorExecute2(t1,t2) \ 196 else if (this->paramCount == 2 && this->defaultValue[0] .getType() == t1##_PARAM && this->defaultValue[1].getType()== t2##_PARAM) \196 else if (this->paramCount == 2 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM) \ 197 197 EXECUTOREXECUTER(_2_##t1##_##t2)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1))) 198 198 199 199 //! execute-macro for functions with three parameters 200 200 #define ExecutorExecute3(t1,t2,t3) \ 201 else if (this->paramCount == 3 && this->defaultValue[0] .getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType()== t3##_PARAM) \201 else if (this->paramCount == 3 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM && this->defaultValue[2] == t3##_PARAM) \ 202 202 EXECUTOREXECUTER(_3_##t1##_##t2##_##t3)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2))) 203 203 204 204 //! execute-macro for functions with four parameters 205 205 #define ExecutorExecute4(t1,t2,t3,t4) \ 206 else if (this->paramCount == 4 && this->defaultValue[0] .getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM && this->defaultValue[3].getType()== t4##_PARAM) \206 else if (this->paramCount == 4 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM && this->defaultValue[2] == t3##_PARAM && this->defaultValue[3] == t4##_PARAM) \ 207 207 EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3))) \ 208 208 … … 210 210 //! execute-macro for functions with five parameters 211 211 #define ExecutorExecute5(t1,t2,t3,t4,t5) \ 212 else if (this->paramCount == 5 && this->defaultValue[0] .getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM && this->defaultValue[3].getType() == t4##_PARAM && this->defaultValue[4].getType()== t5##_PARAM) \212 else if (this->paramCount == 5 && this->defaultValue[0] == t1##_PARAM && this->defaultValue[1] == t2##_PARAM && this->defaultValue[2] == t3##_PARAM && this->defaultValue[3] == t4##_PARAM && this->defaultValue[4] == t5##_PARAM) \ 213 213 EXECUTOREXECUTER(_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)), t5##_FUNC(sub.getString(4), t5##_DEFGRAB(4))) 214 214 … … 269 269 { 270 270 SubString sub((const char*) parameters, " \n\t,", '\\'); 271 printf("%s :: %s\n", this->getName(), (const char*) parameters); 271 272 //! FUNCTOR_LIST is the List of Executive Functions 272 273 #define FUNCTOR_LIST(x) ExecutorExecute ## x
Note: See TracChangeset
for help on using the changeset viewer.