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

Method setAttribute

Engine/source/console/SimXMLDocument.cpp:785–799  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Set attribute of top stack element to given value. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

783// Set attribute of top stack element to given value.
784// -----------------------------------------------------------------------------
785void SimXMLDocument::setAttribute(const char* rAttribute, const char* rVal)
786{
787 if(m_paNode.empty())
788 {
789 return;
790 }
791
792 const S32 iLastElement = m_paNode.size() - 1;
793 tinyxml2::XMLElement* pElement = m_paNode[iLastElement]->ToElement();
794 if(!pElement)
795 {
796 return;
797 }
798 pElement->SetAttribute(rAttribute, rVal);
799}
800DefineEngineMethod( SimXMLDocument, setAttribute, void, ( const char* attributeName, const char* value ),,
801 "@brief Set the attribute of the current Element on the stack to the given value.\n\n"
802 "@param attributeName Name of attribute being changed\n"

Callers 9

SimXMLDocument.cppFile · 0.45
exportFunctionFunction · 0.45
exportTypeFunction · 0.45
exportScopeFunction · 0.45
exportBaseTypesMethod · 0.45
exportEntryTypesMethod · 0.45
exportNamespacesMethod · 0.45
buildDocumentMethod · 0.45

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
SetAttributeMethod · 0.45

Tested by

no test coverage detected