----------------------------------------------------------------------------- Get true if given attribute exists. -----------------------------------------------------------------------------
| 593 | // Get true if given attribute exists. |
| 594 | // ----------------------------------------------------------------------------- |
| 595 | bool 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 | |
| 616 | DefineEngineMethod( SimXMLDocument, attributeExists, bool, ( const char* attributeName ),, |
| 617 | "@brief Tests if the requested attribute exists.\n\n" |
no test coverage detected