MIRA
|
Base iterator for iterating over xml nodes with the same parent (siblings) More...
#include <xml/XMLDom.h>
Public Member Functions | |
iterator_base (_xmlNode *node, const std::string &name) | |
Constructor. More... | |
std::string | operator* () const |
Dereference operator to get the name of the node. More... | |
void | setName (const std::string &name) |
Change the node's name. More... | |
std::string | uri () const |
Return the uri of the node. More... | |
void | setUri (const std::string &uri) |
Set the uri of the node. More... | |
NameSpace | nameSpace () const |
Return the namespace information of the node. More... | |
uint32 | line () const |
Gets the underlying line number of the loaded document for this node. More... | |
const_sibling_iterator | cparent () const |
Get the const parent node sibling_iterator for this node. More... | |
const_sibling_iterator | parent () const |
Get the const parent node sibling_iterator for this node. More... | |
const_sibling_iterator | cbegin () const |
Get the const sibling_iterator to the first sub node. More... | |
const_sibling_iterator | begin () const |
Get the const sibling_iterator to the first sub node. More... | |
const_sibling_iterator | cbegin (const std::string &name) const |
Get the const sibling_same_name_iterator to the first sub node with the given name. More... | |
const_sibling_iterator | begin (const std::string &name) const |
Get the const sibling_same_name_iterator to the first sub node with the given name. More... | |
const_sibling_iterator | cend () const |
Get the const end node sibling_iterator. More... | |
const_sibling_iterator | end () const |
Get the const end node sibling_iterator. More... | |
const_content_iterator | content_cbegin () const |
Get the const iterator to the first content. More... | |
const_content_iterator | content_cend () const |
Get the const end content iterator. More... | |
const_content_iterator | content_begin () const |
Get the const iterator to the first content. More... | |
const_content_iterator | content_end () const |
Get the const end content iterator. More... | |
const_comment_iterator | comment_cbegin () const |
Get the const iterator to the first comment. More... | |
const_comment_iterator | comment_cend () const |
Get the const end comment iterator. More... | |
const_comment_iterator | comment_begin () const |
Get the const iterator to the first comment. More... | |
const_comment_iterator | comment_end () const |
Get the const end comment iterator. More... | |
const_attribute_iterator | attribute_cbegin () const |
Get the const iterator to the first attribute. More... | |
const_attribute_iterator | attribute_cend () const |
Get the const end attribute iterator. More... | |
const_attribute_iterator | attribute_begin () const |
Get the const iterator to the first attribute. More... | |
const_attribute_iterator | attribute_end () const |
Get the const end attribute iterator. More... | |
const_attribute_iterator | find_attribute (const std::string &name) const |
Find an attribute with the name name. More... | |
bool | has_attribute (const std::string &name) const |
Returns true if node contains the attribute with name name. More... | |
template<typename T > | |
T | get_attribute (const std::string &name) const |
Return an attribute value cast to a given type. More... | |
template<typename T > | |
T | get_attribute (const std::string &name, const T &defaultValue) const |
Return an attribute value casted to a given type If the attribute could not be found the given default value will be returned. More... | |
Protected Attributes | |
_xmlNode * | mNode |
The node pointer. More... | |
std::string | mName |
the node name (optional) More... | |
Base iterator for iterating over xml nodes with the same parent (siblings)
iterator_base | ( | _xmlNode * | node, |
const std::string & | name | ||
) |
Constructor.
[in] | node | The actual node. |
[in] | name | For iterating over siblings with same name |
std::string operator* | ( | ) | const |
Dereference operator to get the name of the node.
void setName | ( | const std::string & | name | ) |
Change the node's name.
std::string uri | ( | ) | const |
Return the uri of the node.
This can be the filename of the document or a web address.
void setUri | ( | const std::string & | uri | ) |
Set the uri of the node.
This can be the filename of the document or a web address.
NameSpace nameSpace | ( | ) | const |
Return the namespace information of the node.
uint32 line | ( | ) | const |
Gets the underlying line number of the loaded document for this node.
const_sibling_iterator cparent | ( | ) | const |
Get the const parent node sibling_iterator for this node.
|
inline |
Get the const parent node sibling_iterator for this node.
const_sibling_iterator cbegin | ( | ) | const |
Get the const sibling_iterator to the first sub node.
|
inline |
Get the const sibling_iterator to the first sub node.
const_sibling_iterator cbegin | ( | const std::string & | name | ) | const |
Get the const sibling_same_name_iterator to the first sub node with the given name.
name | The name of the sibling |
|
inline |
Get the const sibling_same_name_iterator to the first sub node with the given name.
name | The name of the sibling |
const_sibling_iterator cend | ( | ) | const |
Get the const end node sibling_iterator.
|
inline |
Get the const end node sibling_iterator.
const_content_iterator content_cbegin | ( | ) | const |
Get the const iterator to the first content.
const_content_iterator content_cend | ( | ) | const |
Get the const end content iterator.
|
inline |
Get the const iterator to the first content.
|
inline |
Get the const end content iterator.
const_comment_iterator comment_cbegin | ( | ) | const |
Get the const iterator to the first comment.
const_comment_iterator comment_cend | ( | ) | const |
Get the const end comment iterator.
|
inline |
Get the const iterator to the first comment.
|
inline |
Get the const end comment iterator.
const_attribute_iterator attribute_cbegin | ( | ) | const |
Get the const iterator to the first attribute.
const_attribute_iterator attribute_cend | ( | ) | const |
Get the const end attribute iterator.
|
inline |
Get the const iterator to the first attribute.
|
inline |
Get the const end attribute iterator.
const_attribute_iterator find_attribute | ( | const std::string & | name | ) | const |
Find an attribute with the name name.
[in] | name | The attribute name. |
|
inline |
Returns true if node contains the attribute with name name.
[in] | name | The attribute name. |
|
inline |
Return an attribute value cast to a given type.
XInvalidConfig | when the attribute could not be found |
[in] | name | The name of the attribute |
|
inline |
Return an attribute value casted to a given type If the attribute could not be found the given default value will be returned.
[in] | name | The name of the attribute |
[in] | defaultValue | The default value that will be returned if the attribute is not found |
|
protected |
The node pointer.
|
protected |
the node name (optional)