Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7200 in orxonox.OLD for trunk/src/lib/util/executor


Ignore:
Timestamp:
Mar 9, 2006, 2:43:47 AM (19 years ago)
Author:
bensch
Message:

orxonox/truink: minor cleanup

Location:
trunk/src/lib/util/executor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/executor/executor.cc

    r7199 r7200  
    108108  {
    109109    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    }
    111118  }
    112119  return this;
  • trunk/src/lib/util/executor/executor.h

    r7199 r7200  
    189189//! execute-macro for functions with one parameter
    190190#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) \
    192192    EXECUTOREXECUTER(_1_##t1)(t1##_FUNC((const char*)parameters, t1##_DEFGRAB(0)))
    193193
    194194//! execute-macro for functions with two parameters
    195195#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) \
    197197    EXECUTOREXECUTER(_2_##t1##_##t2)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)))
    198198
    199199//! execute-macro for functions with three parameters
    200200#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) \
    202202    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)))
    203203
    204204//! execute-macro for functions with four parameters
    205205#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) \
    207207    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))) \
    208208
     
    210210//! execute-macro for functions with five parameters
    211211#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) \
    213213    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)))
    214214
     
    269269    {
    270270      SubString sub((const char*) parameters, " \n\t,", '\\');
     271      printf("%s :: %s\n", this->getName(), (const char*) parameters);
    271272//! FUNCTOR_LIST is the List of Executive Functions
    272273#define FUNCTOR_LIST(x) ExecutorExecute ## x
Note: See TracChangeset for help on using the changeset viewer.