MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / parseAttributes

Method parseAttributes

Engine/source/persistence/taml/xml/tamlXmlReader.cpp:274–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272//-----------------------------------------------------------------------------
273
274void 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

Callers

nothing calls this directly

Calls 6

FirstAttributeMethod · 0.80
NameMethod · 0.80
setPrefixedDataFieldMethod · 0.80
NextMethod · 0.45
insertMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected