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

Method pushFirstChildElement

Engine/source/console/SimXMLDocument.cpp:342–374  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get true if first child element was successfully pushed onto stack. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

340// Get true if first child element was successfully pushed onto stack.
341// -----------------------------------------------------------------------------
342bool SimXMLDocument::pushFirstChildElement(const char* rName)
343{
344 // Clear the current attribute pointer
345 m_CurrentAttribute = 0;
346
347 // Push the first element found under the current element of the given name
348 TiXmlElement* pElement;
349 if(!m_paNode.empty())
350 {
351 const S32 iLastElement = m_paNode.size() - 1;
352 TiXmlElement* pNode = m_paNode[iLastElement];
353 if(!pNode)
354 {
355 return false;
356 }
357 pElement = pNode->FirstChildElement(rName);
358 }
359 else
360 {
361 if(!m_qDocument)
362 {
363 return false;
364 }
365 pElement = m_qDocument->FirstChildElement(rName);
366 }
367
368 if(!pElement)
369 {
370 return false;
371 }
372 m_paNode.push_back(pElement);
373 return true;
374}
375
376DefineEngineMethod( SimXMLDocument, pushFirstChildElement, bool, ( const char* name ),,
377 "@brief Push the first child Element with the given name onto the stack, making it the current Element.\n\n"

Callers 12

SimXMLDocument.cppFile · 0.80
readStateNameMethod · 0.80
readTransitonTargetMethod · 0.80
readFieldNameMethod · 0.80
readFieldComparitorMethod · 0.80
readFieldValueMethod · 0.80
loadStateMachineFileMethod · 0.80
readStatesMethod · 0.80
readTransitionsMethod · 0.80
readConditionsMethod · 0.80
readMethod · 0.80

Calls 4

emptyMethod · 0.45
sizeMethod · 0.45
FirstChildElementMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected