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

Method elementValue

Engine/source/console/SimXMLDocument.cpp:503–517  ·  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

501// for example.
502// -----------------------------------------------------------------------------
503const char* SimXMLDocument::elementValue()
504{
505 if(m_paNode.empty())
506 {
507 return StringTable->EmptyString();
508 }
509 const S32 iLastElement = m_paNode.size() - 1;
510 TiXmlElement* pNode = m_paNode[iLastElement];
511 if(!pNode)
512 {
513 return StringTable->EmptyString();
514 }
515
516 return pNode->Value();
517}
518
519DefineEngineMethod( SimXMLDocument, elementValue, const char*, (),,
520 "@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