|
|
| LibXmlNode () |
| | LibXmlNode constructor that initializes a node with a 'RootNode' default name.
|
| |
|
| LibXmlNode (const std::string &name) |
| | LibXmlNode constructor that initializes a node with a given name.
|
| |
|
| LibXmlNode (const std::string &name, const std::string &value) |
| | LibXmlNode constructor that initializes a node with a given name and value.
|
| |
|
| LibXmlNode (const std::string &name, const std::string &value, bool write) |
| | LibXmlNode constructor that initializes a node with a given name, value and update type.
|
| |
|
| LibXmlNode (const NodePtr &node) |
| | LibXmlNode constructor that initializes a node with a given NodePtr.
|
| |
|
| ~LibXmlNode () |
| | Destructor.
|
| |
| NodePtr | updateChild (const std::string &childName) override |
| | updateChild function creates or finds a node child with a given name based on update type More...
|
| |
| NodePtr | readChild (const std::string &childName) override |
| | readChild function finds a node child with a given name More...
|
| |
| NodePtr | createNode (std::string name, std::string value) override |
| | createNode function creates a new Node and returns a pointer to it. More...
|
| |
| void | initializeNode (std::string name, std::string value) override |
| | initializeNode function initializes a Node with a given name and given value. More...
|
| |
| void | initializeNode (NodePtr node) override |
| | initializeNode function initializes an empty Node with a given node. More...
|
| |
| void | setValue (std::string value) override |
| | setValue function sets a given value to a node. More...
|
| |
| NodePtr | addChild (std::string name) override |
| | addChild function creates and adds a child with a given name to a node and returns a pointer to it. More...
|
| |
| NodePtr | addChild (const NodePtr &childNode) override |
| | addChild function creates and adds a given child node to a node and returns a pointer to it. More...
|
| |
| NodePtr | clone () override |
| | clone function creates a clone of a node. More...
|
| |
| NodePtr | addAttributeNode (const NodePtr &attributeNode) override |
| | addAttributeNode adds a given attribute node to a node and returns a pointer to it. More...
|
| |
|
void | clearChildNodes () override |
| | clearChildNodes clears all child nodes.
|
| |
|
void | clearAttributeNodes () override |
| | clearAttributeNodes clears all attribute nodes.
|
| |
| NodePtr | findChildNode (const std::string &name) override |
| | findChildNode finds a child node with a given name and returns a pointer to it or nullptr if not found. More...
|
| |
| NodePtr | findAttributeNode (const std::string &name) override |
| | findAttributeNode finds an attribute node with a given name and returns a pointer to it or nullptr if not found. More...
|
| |
| NodePtr | getAttribute (const size_t attributeIndex) override |
| | getAttribute returns an attribute with a given index or nullptr if index is invalid. More...
|
| |
| NodePtr | getChild (const size_t childIndex) override |
| | getChild returns a child with a given index or nullptr if index is invalid. More...
|
| |
| size_t | getAttributeCount () override |
| | getAttributeCount returns a number of attributes of a node. More...
|
| |
| size_t | getChildCount () override |
| | getChildCount returns a number of children of a node. More...
|
| |
| void | removeAttribute (const std::string &attributeName) override |
| | removeAttribute removes all attributes with a given name from a node. More...
|
| |
| void | removeAttribute (const size_t attributeIndex) override |
| | removeAttribute removes an attribute with a given index from a node. More...
|
| |
| void | removeAttribute (NodePtr &attributeNode) override |
| | removeAttribute removes an attribute that has the same name as given attribute node. More...
|
| |
| void | removeChild (const std::string &childName) override |
| | removeChild removes all children with a given name from a node. More...
|
| |
| void | removeChild (const size_t childIndex) override |
| | removeChild removes a child with a given index from a node. More...
|
| |
| void | removeChild (NodePtr &childNode) override |
| | removeChild removes a child that has the same name as given node. More...
|
| |
| std::string | getName () override |
| | getName returns a name of a node. More...
|
| |
| std::string | getValue () override |
| | getValue returns a value of a node. More...
|
| |
| NodePtr | getNextSibling () override |
| | getNextSibling returns a sibling of a node or nullptr if it does not exist. More...
|
| |
| void | updateOperation (bool write) override |
| | updateOperation sets a node update operation (node can be used either for writing or reading). More...
|
| |
| bool | isWrite () override |
| | isWrite returns true if node should be used for writing or false otherwise. More...
|
| |
| bool | isInitialized () override |
| | isInitialized returns true if node is initialized or false otherwise. More...
|
| |
| bool | isEmpty () override |
| | isEmpty returns true if node does not have any children, attributes and if it does not have any value More...
|
| |
|
void | destroy () override |
| | destroy function releases internal node and sets it value to nullptr.
|
| |
| void | saveToFile (const std::string &fileName) override |
| | saveToFile saves an internal node to a given file. More...
|
| |
| void | readFromFile (const std::string &fileName) override |
| | readFromFile reads and builds an internal node from a given file. More...
|
| |
| void | saveToStream (std::ostream &outStream) override |
| | saveToStream saves an internal node to a given ostream. More...
|
| |
| void | readFromStream (std::istream &inStream) override |
| | readFromStream reads and builds an internal node from a given istream. More...
|
| |
| template<typename T > |
| void | addAttribute (const std::string &name, const T &value) |
| | addAttribute function adds an attribute with a given name and given value to a node. More...
|
| |
| template<typename T > |
| void | write (const std::string &name, const T &value) |
| | write function creates a new child with a given name and adds a given value to it. More...
|
| |
| template<typename T , typename U > |
| void | write (const std::string &name, const T &value, const U &defaultValue) |
| | write function creates a new child with a given name and adds a given value to it. More...
|
| |
| template<typename T > |
| void | read (const std::string &name, T &value) |
| | read function reads a value from a nodes child with a given name. More...
|
| |
| template<typename T , typename U > |
| void | read (const std::string &name, T &value, const U &defaultValue) |
| | read function reads a value from a nodes child with a given name. More...
|
| |
| template<typename T > |
| void | update (const std::string &name, T &value) |
| | update function writes or reads a value to/from a node, depends on nodes isWriteUpdateType More...
|
| |
| template<typename T , typename U > |
| void | update (const std::string &name, T &value, const U &defaultValue) |
| | update function writes or reads a value to/from a node, depends on nodes isWriteUpdateType More...
|
| |
| NodePtr | clone (const NodePtr &nodeToClone) |
| | clone function creates a clone of a given node and returns a pointer to it. More...
|
| |
| bool | isDummy () const |
| | isDummy returns true if node was created as a dummy node in updateChild function More...
|
| |
LibXmlNode is a class that inherits from Node and SerializableNode.
It uses libxml2 library for parsing and creating xml files. It implements functions from Node and SerializableNode abstract classes.