Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4501 in orxonox.OLD for orxonox/trunk/src/util/loading


Ignore:
Timestamp:
Jun 3, 2005, 11:59:34 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loading of track works just fine now. little problems with the setSavePoint-function

Location:
orxonox/trunk/src/util/loading
Files:
2 edited

Legend:

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

    r4496 r4501  
    3434  this->loadString = NULL;
    3535
    36   if (likely(!multi))
    37     this->loadString = grabParameter(root, paramName);
     36  if (paramCount == 0)
     37    this->loadString = "none";
    3838  else
    3939    {
    40       printf("paramName:::::%s\n", root->Value());
    41       if (!strcmp(root->Value(), paramName))
    42         {
    43           const TiXmlNode* val = root->FirstChild();
    44           if( val->ToText())
    45             this->loadString = val->Value();
    46         }
    47     }
    48   if (loadString)
    49     printf("%s\n", loadString);
     40      if (likely(!multi))
     41        this->loadString = grabParameter(root, paramName);
     42      else
     43        {
     44          if (!strcmp(root->Value(), paramName))
     45            {
     46              const TiXmlNode* val = root->FirstChild();
     47              if( val->ToText())
     48                this->loadString = val->Value();
     49            }
     50        }
     51    }
    5052
    5153  this->paramDesc = NULL;
  • orxonox/trunk/src/util/loading/load_param.h

    r4496 r4501  
    247247{
    248248 public:
     249  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(), bool multi = false)
     250    : BaseLoadParam(root, pt2Object, paramName, 0, multi, "")
     251    {
     252      if (loadString != NULL && root != NULL)
     253        (*pt2Object.*function)();
     254      else
     255        PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName());
     256    }
     257
     258
    249259  //! makes functions with one string loadable
    250260  LoadParam1(l_STRING);
Note: See TracChangeset for help on using the changeset viewer.