----------------------------------------------------------------------------- Obtain the name of the current element's last attribute -----------------------------------------------------------------------------
| 662 | // Obtain the name of the current element's last attribute |
| 663 | // ----------------------------------------------------------------------------- |
| 664 | const char* SimXMLDocument::lastAttribute() |
| 665 | { |
| 666 | // Get the current element |
| 667 | if(m_paNode.empty()) |
| 668 | { |
| 669 | return StringTable->EmptyString(); |
| 670 | } |
| 671 | const S32 iLastElement = m_paNode.size() - 1; |
| 672 | TiXmlElement* pNode = m_paNode[iLastElement]; |
| 673 | if(!pNode) |
| 674 | { |
| 675 | return StringTable->EmptyString(); |
| 676 | } |
| 677 | |
| 678 | // Gets its last attribute, if any |
| 679 | m_CurrentAttribute = pNode->LastAttribute(); |
| 680 | if(!m_CurrentAttribute) |
| 681 | { |
| 682 | return StringTable->EmptyString(); |
| 683 | } |
| 684 | |
| 685 | return m_CurrentAttribute->Name(); |
| 686 | } |
| 687 | |
| 688 | DefineEngineMethod( SimXMLDocument, lastAttribute, const char*, (),, |
| 689 | "@brief Obtain the name of the current Element's last attribute.\n\n" |
no test coverage detected