----------------------------------------------------------------------------- Get true if first child element was successfully pushed onto stack. -----------------------------------------------------------------------------
| 189 | // Get true if first child element was successfully pushed onto stack. |
| 190 | // ----------------------------------------------------------------------------- |
| 191 | bool SimXMLDocument::pushFirstChildElement(const char* rName) |
| 192 | { |
| 193 | // Clear the current attribute pointer |
| 194 | m_CurrentAttribute = 0; |
| 195 | |
| 196 | // Push the first element found under the current element of the given name |
| 197 | TiXmlElement* pElement; |
| 198 | if(!m_paNode.empty()) |
| 199 | { |
| 200 | const int iLastElement = m_paNode.size() - 1; |
| 201 | TiXmlElement* pNode = m_paNode[iLastElement]; |
| 202 | if(!pNode) |
| 203 | { |
| 204 | return false; |
| 205 | } |
| 206 | pElement = pNode->FirstChildElement(rName); |
| 207 | } |
| 208 | else |
| 209 | { |
| 210 | if(!m_qDocument) |
| 211 | { |
| 212 | return false; |
| 213 | } |
| 214 | pElement = m_qDocument->FirstChildElement(rName); |
| 215 | } |
| 216 | |
| 217 | if(!pElement) |
| 218 | { |
| 219 | return false; |
| 220 | } |
| 221 | m_paNode.push_back(pElement); |
| 222 | return true; |
| 223 | } |
| 224 | |
| 225 | // ----------------------------------------------------------------------------- |
| 226 | // Get true if first child element was successfully pushed onto stack. |
no test coverage detected