| 272 | //----------------------------------------------------------------------------- |
| 273 | |
| 274 | void TamlXmlReader::parseAttributes( TiXmlElement* pXmlElement, SimObject* pSimObject ) |
| 275 | { |
| 276 | // Debug Profiling. |
| 277 | PROFILE_SCOPE(TamlXmlReader_ParseAttributes); |
| 278 | |
| 279 | // Sanity! |
| 280 | AssertFatal( pSimObject != NULL, "Taml: Cannot parse attributes on a NULL object." ); |
| 281 | |
| 282 | // Iterate attributes. |
| 283 | for ( TiXmlAttribute* pAttribute = pXmlElement->FirstAttribute(); pAttribute; pAttribute = pAttribute->Next() ) |
| 284 | { |
| 285 | // Insert attribute name. |
| 286 | StringTableEntry attributeName = StringTable->insert( pAttribute->Name() ); |
| 287 | |
| 288 | // Ignore if this is a Taml attribute. |
| 289 | if ( attributeName == tamlRefIdName || |
| 290 | attributeName == tamlRefToIdName || |
| 291 | attributeName == tamlNamedObjectName ) |
| 292 | continue; |
| 293 | |
| 294 | // Set the field. |
| 295 | pSimObject->setPrefixedDataField(attributeName, NULL, pAttribute->Value()); |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | //----------------------------------------------------------------------------- |
| 300 |
nothing calls this directly
no test coverage detected