MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / nextSiblingElement

Method nextSiblingElement

Engine/source/console/SimXMLDocument.cpp:467–491  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Convert top stack element into its next sibling element. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

465// Convert top stack element into its next sibling element.
466// -----------------------------------------------------------------------------
467bool SimXMLDocument::nextSiblingElement(const char* rName)
468{
469 // Clear the current attribute pointer
470 m_CurrentAttribute = 0;
471
472 // Attempt to find the next sibling element
473 if(m_paNode.empty())
474 {
475 return false;
476 }
477 const S32 iLastElement = m_paNode.size() - 1;
478 tinyxml2::XMLNode*& pElement = m_paNode[iLastElement];
479 if(!pElement)
480 {
481 return false;
482 }
483
484 pElement = pElement->NextSiblingElement(rName);
485 if(!pElement)
486 {
487 return false;
488 }
489
490 return true;
491}
492
493DefineEngineMethod( SimXMLDocument, nextSiblingElement, bool, ( const char* name ),,
494 "@brief Put the next sibling Element with the given name on the stack, making it the current one.\n\n"

Callers 1

SimXMLDocument.cppFile · 0.80

Calls 3

NextSiblingElementMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected