Changeset 4492 in orxonox.OLD for orxonox/trunk/src/util/loading/factory.cc
- Timestamp:
- Jun 3, 2005, 1:55:22 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/loading/factory.cc
r4487 r4492 94 94 } 95 95 96 /**97 \param root: The XML-element to grab a parameter from98 \param parameterName: the parameter to grab99 \returns the Value of the parameter if found, NULL otherwise100 */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.