Changeset 4501 in orxonox.OLD for orxonox/trunk/src/util/loading
- Timestamp:
- Jun 3, 2005, 11:59:34 AM (19 years ago)
- Location:
- orxonox/trunk/src/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/loading/load_param.cc
r4496 r4501 34 34 this->loadString = NULL; 35 35 36 if ( likely(!multi))37 this->loadString = grabParameter(root, paramName);36 if (paramCount == 0) 37 this->loadString = "none"; 38 38 else 39 39 { 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 } 50 52 51 53 this->paramDesc = NULL; -
orxonox/trunk/src/util/loading/load_param.h
r4496 r4501 247 247 { 248 248 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 249 259 //! makes functions with one string loadable 250 260 LoadParam1(l_STRING);
Note: See TracChangeset
for help on using the changeset viewer.