DART
6.10.1
|
TemplatedElementEnumerator is a convenience class to help visiting all the child elements of given parent element. More...
#include <XmlHelpers.hpp>
Public Member Functions | |
TemplatedElementEnumerator (ElementPtr parentElement, const std::string &childElementName) | |
Constructor that takes parent element and. More... | |
~TemplatedElementEnumerator () | |
Destructor. More... | |
bool | next () |
Set the current element to the next sibling element or to the first child element of given parent element if it exists; returns success. More... | |
ElementPtr | get () const |
Get the current element. More... | |
ElementPtr | operator-> () const |
Dereference operator. More... | |
ElementRef | operator* () const |
Dereference operator. More... | |
bool | operator== (const TemplatedElementEnumerator< ElementType > &rhs) const |
Equality operator. More... | |
TemplatedElementEnumerator< ElementType > & | operator= (const TemplatedElementEnumerator< ElementType > &rhs) |
Assignment operator. More... | |
Protected Types | |
using | ElementPtr = ElementType * |
using | ElementRef = ElementType & |
Private Member Functions | |
bool | valid () const |
Returns true if the current element is valid (not a nullptr) More... | |
Private Attributes | |
ElementPtr | mParentElement |
Parent element. More... | |
std::string | mChildElementName |
Child element name. More... | |
ElementPtr | mCurrentElement |
Currently visiting child element. More... | |
TemplatedElementEnumerator is a convenience class to help visiting all the child elements of given parent element.
This class is templated to cover const and non-const tinyxml2::XMLElement types.
|
protected |
|
protected |
|
inline |
Constructor that takes parent element and.
|
inline |
Destructor.
|
inline |
Get the current element.
|
inline |
Set the current element to the next sibling element or to the first child element of given parent element if it exists; returns success.
|
inline |
Dereference operator.
|
inline |
Dereference operator.
|
inline |
Assignment operator.
|
inline |
Equality operator.
|
inlineprivate |
Returns true if the current element is valid (not a nullptr)
|
private |
Child element name.
|
private |
Currently visiting child element.
|
private |
Parent element.