Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4492 in orxonox.OLD for orxonox/trunk/src/util/loading/factory.cc


Ignore:
Timestamp:
Jun 3, 2005, 1:55:22 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: importer works again

File:
1 edited

Legend:

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

    r4487 r4492  
    9494}
    9595
    96 /**
    97    \param root: The XML-element to grab a parameter from
    98    \param parameterName: the parameter to grab
    99    \returns the Value of the parameter if found, NULL otherwise
    100 */
    101 const char* grabParameter(const TiXmlElement* root, const char* parameterName)
    102 {
    103   const TiXmlElement* element;
    104   const TiXmlNode* node;
    105        
    106   if (root == NULL)
    107     return NULL;
    108   assert( parameterName != NULL);
    109        
    110   element = root->FirstChildElement( parameterName);
    111   if( element == NULL) return NULL;
    112        
    113   node = element->FirstChild();
    114   while( node != NULL)
    115     {
    116       if( node->ToText()) return node->Value();
    117       node = node->NextSibling();
    118     }
    119   return NULL;
    120 }
    121 
Note: See TracChangeset for help on using the changeset viewer.