Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7990 in orxonox.OLD for branches/gui/src/lib/util


Ignore:
Timestamp:
May 30, 2006, 9:07:10 PM (18 years ago)
Author:
bensch
Message:

gui: all up to 5 opts are accepted

File:
1 edited

Legend:

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

    r7985 r7990  
    163163  virtual void operator()(BaseObject* object, unsigned int count, const MultiType* values) const
    164164  {
    165     switch(count)
    166     {
    167       case 0:
    168         return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(fromMulti<type0>(this->defaultValue[0]));
    169       default:
    170        return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(fromMulti<type0>(values[0]));
    171     }
     165    return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
     166             fromMulti<type0>((count > 0)? values[0] : this->defaultValue[0]) );
    172167  }
    173168
     
    180175  virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const
    181176  {
    182 
    183     /* // THE VERY COOL DEBUG
    184       printf("SUB[0] : %s\n", sub[0].c_str());
    185       printf("getDefault<type0>(this->defaultValue, 0):::: %d\n", getDefault<type0>(this->defaultValue, 0));
    186       printf("VALUE: %d\n", fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)));
    187     */
    188177    (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
    189178      fromString<type0>(sub[0], getDefault<type0>(this->defaultValue, 0)) );
     
    236225  virtual void operator()(BaseObject* object, unsigned int count, const MultiType* values) const
    237226  {
     227    return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
     228             fromMulti<type0>((count > 0) ? values[0] : this->defaultValue[0]),
     229             fromMulti<type1>((count > 1) ? values[1] : this->defaultValue[1]) );
    238230  }
    239231
     
    286278  virtual void operator()(BaseObject* object, unsigned int count, const MultiType* values) const
    287279  {
     280    return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
     281             fromMulti<type0>((count > 0) ? values[0] : this->defaultValue[0]),
     282             fromMulti<type1>((count > 1) ? values[1] : this->defaultValue[1]),
     283             fromMulti<type2>((count > 2) ? values[2] : this->defaultValue[2]) );
    288284  }
    289285
     
    338334  virtual void operator()(BaseObject* object, unsigned int count, const MultiType* values) const
    339335  {
     336    return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
     337             fromMulti<type0>((count > 0) ? values[0] : this->defaultValue[0]),
     338             fromMulti<type1>((count > 1) ? values[1] : this->defaultValue[1]),
     339             fromMulti<type2>((count > 2) ? values[2] : this->defaultValue[2]),
     340             fromMulti<type3>((count > 3) ? values[3] : this->defaultValue[3]) );
    340341  }
    341342
     
    391392  virtual void operator()(BaseObject* object, unsigned int count, const MultiType* values) const
    392393  {
     394    return (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)(
     395             fromMulti<type0>((count > 0) ? values[0] : this->defaultValue[0]),
     396             fromMulti<type1>((count > 1) ? values[1] : this->defaultValue[1]),
     397             fromMulti<type2>((count > 2) ? values[2] : this->defaultValue[2]),
     398             fromMulti<type3>((count > 3) ? values[3] : this->defaultValue[3]),
     399             fromMulti<type4>((count > 4) ? values[4] : this->defaultValue[4]) );
    393400  }
    394401
Note: See TracChangeset for help on using the changeset viewer.