Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7198 in orxonox.OLD for trunk/src/lib/util/loading/load_param.cc


Ignore:
Timestamp:
Mar 8, 2006, 2:30:19 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: new Default Values… they now too are in MultiType instead of (count, …) or (count, va_arg) style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/loading/load_param.cc

    r7193 r7198  
    6363    if (likely(this->object != NULL) &&
    6464        ( this->loadString != NULL ||
    65          ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString)))
     65          ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString)))
    6666    {
    6767      PRINTF(4)("Loading '%s' with Parameters '%s' onto: '%s'(%s)\n", this->paramName, this->loadString, this->object->getName(), this->object->getClassName());
     
    7373
    7474/**
    75  * set the default values of the executor
    76  * @param count how many default values to set.
    77  * @param ... the default values !! must be at least count parameters!!
    78  */
    79 CLoadParam& CLoadParam::defaultValues(unsigned int count, ...)
    80 {
    81   va_list values;
    82   va_start(values, count);
    83 
    84   assert(executor != NULL);
    85   this->executor->defaultValues(count, values);
     75 * @brief set the default values of the executor
     76 * @param value0 the first default value
     77 * @param value1 the second default value
     78 * @param value2 the third default value
     79 * @param value3 the fourth default value
     80 * @param value4 the fifth default value
     81 */
     82CLoadParam& CLoadParam::defaultValues(const MultiType& value0, const MultiType& value1,
     83                                      const MultiType& value2, const MultiType& value3,
     84                                      const MultiType& value4)
     85{
     86  assert(this->executor != NULL);
     87  this->executor->defaultValues(value0, value1, value2, value3, value4);
    8688
    8789  return *this;
     
    9799{
    98100  if (LoadClassDescription::parametersDescription && this->paramDesc && !this->paramDesc->getDescription())
    99     {
    100       this->paramDesc->setDescription(descriptionText);
    101     }
     101  {
     102    this->paramDesc->setDescription(descriptionText);
     103  }
    102104  return *this;
    103105}
     
    239241  node = element->FirstChild();
    240242  while( node != NULL)
    241     {
    242       if( node->ToText()) return node->Value();
    243       node = node->NextSibling();
    244     }
     243  {
     244    if( node->ToText()) return node->Value();
     245    node = node->NextSibling();
     246  }
    245247  return NULL;
    246248}
Note: See TracChangeset for help on using the changeset viewer.