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

Method elementValue

Engine/source/console/SimXMLDocument.cpp:505–519  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get element value if it exists. Used to extract a text node from the element. for example. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

503// for example.
504// -----------------------------------------------------------------------------
505const char* SimXMLDocument::elementValue()
506{
507 if(m_paNode.empty())
508 {
509 return StringTable->EmptyString();
510 }
511 const S32 iLastElement = m_paNode.size() - 1;
512 tinyxml2::XMLNode* pNode = m_paNode[iLastElement];
513 if(!pNode)
514 {
515 return StringTable->EmptyString();
516 }
517
518 return pNode->Value();
519}
520
521DefineEngineMethod( SimXMLDocument, elementValue, const char*, (),,
522 "@brief Get the Element's value if it exists.\n\n"

Callers 2

SimXMLDocument.cppFile · 0.80
readLayerMethod · 0.80

Calls 4

EmptyStringMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected