|
commonlib
|
DxNode class defines an internal xml node and implements functions for creating, modifying and removing xml tree elements that are used in LibXmlNode class. More...
#include <dx_node.h>
Public Member Functions | |
| DxNode () | |
| Default constructor that creates an instance od a DxNode class with default values. | |
| DxNode (const std::string &name, const std::string &value="") | |
| Constructor that creates an instance od a DxNode class with a given name. More... | |
| ~DxNode () | |
| Destructor. | |
Static Public Member Functions | |
| static DxNodePtr | dxNodeCreate (const std::string &nodeName, const std::string &value) |
| Function creates and returns a new node with a given name and value. More... | |
| static void | dxNodeDestroy (DxNodePtr &node) |
| Function recursively clears all child nodes and sets node pointer to nullptr. More... | |
| static void | dxNodeSetValue (const DxNodePtr &node, const std::string &value) |
| Function sets a value to a node. More... | |
| static void | dxNodeMakeChildNodes (const DxNodePtr &node) |
| Function creates a new pointer to child elements and assigns it to a given node. More... | |
| static void | dxNodeRemoveChild (const DxNodePtr &node, DxNodePtr &childNode) |
| Function removes a given child from a given node. More... | |
| static void | dxNodeRemoveChild (const DxNodePtr &node, const std::string &name) |
| Function removes children with a given name from a given node. More... | |
| static void | dxNodeRemoveChild (const DxNodePtr &node, const size_t childIndex) |
| Function removes a child with a given index from a given node. More... | |
| static void | dxNodeClearChildNodes (const DxNodePtr &node) |
| Function clears all children elements of a given node. More... | |
| static void | dxNodeRemoveAttributeNode (const DxNodePtr &node, DxNodePtr &attributeNode) |
| Function removes a given attribute from a given node. More... | |
| static void | dxNodeRemoveAttributeNode (const DxNodePtr &node, const std::string &attributeName) |
| Function removes attributes with a given name from a given node. More... | |
| static void | dxNodeRemoveAttributeNode (const DxNodePtr &node, const size_t attributeIndex) |
| Function removes an attribute with a given index from a given node. More... | |
| static DxNodePtr | dxNodeFindChildNode (const DxNodePtr &node, const std::string &childNodeName) |
| Function returns a shared pointer to a child node with a given name. More... | |
| static DxNodePtr | dxNodeFindAttributeNode (const DxNodePtr &node, const std::string &attributeNodeName) |
| Function returns a shared pointer to an attribute node with a given name. More... | |
| static void | dxNodeAddChildNode (const DxNodePtr &node, const DxNodePtr &childNode) |
| Function adds a given child to a given node. More... | |
| static DxNodePtr | dxNodeGetAttribute (const DxNodePtr &node, const size_t attributeIndex) |
| Function returns an attribute with a given index. More... | |
| static void | dxNodeAddAttributeNode (const DxNodePtr &node, const DxNodePtr &attributeNode) |
| Function adds a given attribute to a given node. More... | |
| static size_t | dxNodeGetChildCount (const DxNodePtr &node) |
| Function returns a number of child elements of a given node. More... | |
| static DxNodePtr | dxNodeGetChild (const DxNodePtr &node, const size_t childIndex) |
| Function returns a child with a given index. More... | |
| static DxNodePtr | dxNodeGetNextSibling (const DxNodePtr &node) |
| Function returns a sibling of a given node (next child of a given node parent). More... | |
| static size_t | dxNodeGetAttributeCount (const DxNodePtr &node) |
| Function returns a number of attribute elements of a given node. More... | |
| static void | dxNodeClearAttributeNodes (const DxNodePtr &node) |
| Function clears all attribute elements of a given node. More... | |
| static DxNodePtr | dxNodeClone (const DxNodePtr &sourceNode) |
| Function creates and returns a copy of a given node. More... | |
Public Attributes | |
| std::string | name |
| Name of a node. | |
| std::string | value |
| Value of a node. | |
| DxNodeExtInfoPtr | extInfo = nullptr |
| Shared pointer to a DxNodeExtInfo that contains pointers to child and attribute elements. | |
| DxNodeWPtr | parent |
| Weak pointer to a parent node. | |
| size_t | childIndex = 0 |
| Child index of a node. | |
DxNode class defines an internal xml node and implements functions for creating, modifying and removing xml tree elements that are used in LibXmlNode class.
|
inlineexplicit |
|
static |
Function adds a given attribute to a given node.
| node | Shared pointer to a node |
| attributeNode | Shared pointer to an attribute node |
|
static |
Function adds a given child to a given node.
| node | Shared pointer to a node |
| childNode | Shared pointer to a child node |
|
static |
Function clears all attribute elements of a given node.
| node | Shared pointer to a node |
|
static |
Function clears all children elements of a given node.
| node | Shared pointer to a node |
|
static |
Function creates and returns a copy of a given node.
| sourceNode | Shared pointer to a source node |
|
static |
|
static |
Function recursively clears all child nodes and sets node pointer to nullptr.
| node | Shared pointer to a node |
|
static |
Function returns a shared pointer to an attribute node with a given name.
| node | Shared pointer to a node |
| attributeNodeName | Attribute name |
|
static |
Function returns a shared pointer to a child node with a given name.
| node | Shared pointer to a node |
| childNodeName | Child node name |
|
static |
Function returns an attribute with a given index.
| node | Shared pointer to a node |
| attributeIndex | Attribute index |
|
static |
Function returns a number of attribute elements of a given node.
| node | Shared pointer to a node |
|
static |
Function returns a child with a given index.
| node | Shared pointer to a node |
| childIndex | Child index |
|
static |
Function returns a number of child elements of a given node.
| node | Shared pointer to a node |
|
static |
Function returns a sibling of a given node (next child of a given node parent).
| node | Shared pointer to a node |
|
static |
Function creates a new pointer to child elements and assigns it to a given node.
| node | Shared pointer to a node |
|
static |
Function removes a given attribute from a given node.
| node | Shared pointer to a node |
| attributeNode | Shared pointer to an attribute node |
|
static |
Function removes attributes with a given name from a given node.
| node | Shared pointer to a node |
| attributeName | A name of an attribute to remove |
|
static |
Function removes an attribute with a given index from a given node.
| node | Shared pointer to a node |
| attributeIndex | An index of an attribute to remove |
|
static |
Function removes a given child from a given node.
| node | Shared pointer to a node |
| childNode | Shared pointer to a child node |
|
static |
Function removes children with a given name from a given node.
| node | Shared pointer to a node |
| name | A name of a child to remove |
|
static |
Function removes a child with a given index from a given node.
| node | Shared pointer to a node |
| childIndex | An index of a child to remove |
|
static |
Function sets a value to a node.
| node | Shared pointer to a node |
| value | A value |