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

Method attributeExists

Engine/source/console/SimXMLDocument.cpp:595–614  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get true if given attribute exists. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

593// Get true if given attribute exists.
594// -----------------------------------------------------------------------------
595bool SimXMLDocument::attributeExists(const char* rAttribute)
596{
597 if(m_paNode.empty())
598 {
599 return false;
600 }
601 const S32 iLastElement = m_paNode.size() - 1;
602 TiXmlElement* pNode = m_paNode[iLastElement];
603 if(!pNode)
604 {
605 return false;
606 }
607
608 if(!pNode->Attribute(rAttribute))
609 {
610 return false;
611 }
612
613 return true;
614}
615
616DefineEngineMethod( SimXMLDocument, attributeExists, bool, ( const char* attributeName ),,
617 "@brief Tests if the requested attribute exists.\n\n"

Callers 1

SimXMLDocument.cppFile · 0.80

Calls 3

AttributeMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected