|
libcrn
3.9.5
A document image processing library
|
XML node. More...
#include <CRNXml.h>
Inheritance diagram for crn::xml::Node:Public Member Functions | |
| virtual | ~Node () |
| Destructor. More... | |
| Node (const Node &)=default | |
| Node (Node &&)=default | |
| Node & | operator= (const Node &)=default |
| Node & | operator= (Node &&)=default |
| bool | IsElement () |
| Checks if the node is an element. More... | |
| bool | IsComment () |
| Checks if the node is a comment. More... | |
| bool | IsText () |
| Checks if the node is a text. More... | |
| Element | AsElement () |
| Converts to element. More... | |
| Comment | AsComment () |
| Converts to comment. More... | |
| Text | AsText () |
| Converts to text. More... | |
| operator bool () const noexcept | |
| Checks if the node is not null. More... | |
| bool | operator! () const noexcept |
| Checks if the node is null. More... | |
| bool | operator== (const Node &other) const noexcept |
| Comparison operator. More... | |
| bool | operator!= (const Node &other) const noexcept |
| Comparison operator. More... | |
| virtual StringUTF8 | GetValue () const |
| Gets the content of the node. More... | |
| void | SetValue (const StringUTF8 &s) |
| Sets the content of the node. More... | |
| Node | GetParent () |
| Gets the parent node if any. More... | |
| Node | GetPreviousSibling () |
| Gets the previous sibling node. More... | |
| Node | GetNextSibling () |
| Gets the next sibling node. More... | |
| Node & | operator++ () |
| Moves to the next sibling node. More... | |
| Node | operator++ (int) |
| Moves to the next sibling node. More... | |
| Element | GetNextSiblingElement (const StringUTF8 &name="") |
| Gets the next sibling element. More... | |
| Element | GetPreviousSiblingElement (const StringUTF8 &name="") |
| Gets the previous sibling element. More... | |
Protected Member Functions | |
| Node (tinyxml2::XMLNode *n, const SCharsetConverter &c) | |
| Constructor. More... | |
Protected Attributes | |
| SCharsetConverter | conv |
Friends | |
| class | Document |
| class | Element |
|
default |
|
default |
|
protected |
Constructor.
Constructor
| [in] | n | the inner node pointer |
| [in] | c | a character set converter |
Definition at line 97 of file CRNXml.cpp.
| Comment Node::AsComment | ( | ) |
Converts to comment.
Converts to comment
| ExceptionDomain | not a comment |
Definition at line 144 of file CRNXml.cpp.
| Element Node::AsElement | ( | ) |
Converts to element.
Converts to element
| ExceptionDomain | not an element |
Definition at line 130 of file CRNXml.cpp.
| Text Node::AsText | ( | ) |
Converts to text.
Converts to text
| ExceptionDomain | not a text |
Definition at line 158 of file CRNXml.cpp.
| Node Node::GetNextSibling | ( | ) |
Gets the next sibling node.
Gets the next sibling node
Definition at line 206 of file CRNXml.cpp.
| Element Node::GetNextSiblingElement | ( | const StringUTF8 & | name = "" | ) |
Gets the next sibling element.
Gets the next sibling element
| CharsetConverter::ExceptionInvalidCharacter | invalid character |
| CharsetConverter::ExceptionIncompleteCode | incomplete multibyte character |
| [in] | name | the name of the element or empty string for any element |
Definition at line 247 of file CRNXml.cpp.
| Node Node::GetParent | ( | ) |
Gets the parent node if any.
Gets the parent node if any
Definition at line 189 of file CRNXml.cpp.
| Node Node::GetPreviousSibling | ( | ) |
Gets the previous sibling node.
Gets the previous sibling node
Definition at line 198 of file CRNXml.cpp.
| Element Node::GetPreviousSiblingElement | ( | const StringUTF8 & | name = "" | ) |
Gets the previous sibling element.
Gets the previous sibling element
| CharsetConverter::ExceptionInvalidCharacter | invalid character |
| CharsetConverter::ExceptionIncompleteCode | incomplete multibyte character |
| [in] | name | the name of the element or empty string for any element |
Definition at line 236 of file CRNXml.cpp.
|
virtual |
Gets the content of the node.
Gets the content of the node
Reimplemented in crn::xml::Text.
Definition at line 171 of file CRNXml.cpp.
| bool Node::IsComment | ( | ) |
Checks if the node is a comment.
Definition at line 111 of file CRNXml.cpp.
| bool Node::IsElement | ( | ) |
Checks if the node is an element.
Definition at line 103 of file CRNXml.cpp.
| bool Node::IsText | ( | ) |
Checks if the node is a text.
Definition at line 119 of file CRNXml.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| Node & Node::operator++ | ( | ) |
Moves to the next sibling node.
Moves to the next sibling node
Definition at line 214 of file CRNXml.cpp.
| Node Node::operator++ | ( | int | ) |
Moves to the next sibling node.
Moves to the next sibling node
Definition at line 223 of file CRNXml.cpp.
|
inlinenoexcept |
| void Node::SetValue | ( | const StringUTF8 & | s | ) |
Sets the content of the node.
Sets the content of the node
| CharsetConverter::ExceptionInvalidCharacter | invalid character |
| CharsetConverter::ExceptionIncompleteCode | incomplete multibyte character |
| [in] | s | the new content of the node |
Definition at line 181 of file CRNXml.cpp.
1.8.6