Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::file::xml::node Class Reference

#include <xmlFile.hpp>

Inheritance diagram for iv::file::xml::node:
[legend]
Collaboration diagram for iv::file::xml::node:
[legend]

Public Member Functions

 node ()=default
 
 node (const pugi::xml_node &_node)
 
 node (const node &other)=default
 
 node (node &&other)=default
 
 ~node ()=default
 
nodeoperator= (const node &other)=default
 
nodeoperator= (node &&other)=default
 
bool emptyNode () const
 
bool isNull () const
 
void removeAttributes ()
 
template<typename T >
getAttribute (const std::string_view key, T defaultValue) const
 
template<typename T >
bool addAttribute (const std::string_view key, T value)
 
void setText (const std::string_view text) const
 
std::string getText () const
 
void removeChild (std::string_view name)
 
void removeChildren ()
 
bool hasChild (std::string_view name) const
 
void appendNode (const iv::file::xml::node &_node)
 
iv::file::xml::node getChild (std::string_view name) const
 
std::vector< nodegetChildren () const
 
iv::file::xml::node appendChild (std::string_view name)
 

Private Attributes

std::string m_nodeName
 

Constructor & Destructor Documentation

◆ node() [1/4]

iv::file::xml::node::node ( )
default

◆ node() [2/4]

iv::file::xml::node::node ( const pugi::xml_node & _node)

◆ node() [3/4]

iv::file::xml::node::node ( const node & other)
default

◆ node() [4/4]

iv::file::xml::node::node ( node && other)
default

◆ ~node()

iv::file::xml::node::~node ( )
default

Member Function Documentation

◆ addAttribute()

template<typename T >
bool iv::file::xml::node::addAttribute ( const std::string_view key,
T value )
inline

◆ appendChild()

iv::file::xml::node iv::file::xml::node::appendChild ( std::string_view name)
Parameters
name
Exceptions
iv::exception::StreamIOErrorif there's an error inserting new node.
Returns

◆ appendNode()

void iv::file::xml::node::appendNode ( const iv::file::xml::node & _node)

◆ emptyNode()

bool iv::file::xml::node::emptyNode ( ) const
nodiscard

◆ getAttribute()

template<typename T >
T iv::file::xml::node::getAttribute ( const std::string_view key,
T defaultValue ) const
inline

◆ getChild()

iv::file::xml::node iv::file::xml::node::getChild ( std::string_view name) const
nodiscard

◆ getChildren()

std::vector< node > iv::file::xml::node::getChildren ( ) const
nodiscard

◆ getText()

std::string iv::file::xml::node::getText ( ) const
inlinenodiscard

◆ hasChild()

bool iv::file::xml::node::hasChild ( std::string_view name) const
nodiscard

◆ isNull()

bool iv::file::xml::node::isNull ( ) const
nodiscard

◆ operator=() [1/2]

node & iv::file::xml::node::operator= ( const node & other)
default

◆ operator=() [2/2]

node & iv::file::xml::node::operator= ( node && other)
default

◆ removeAttributes()

void iv::file::xml::node::removeAttributes ( )

◆ removeChild()

void iv::file::xml::node::removeChild ( std::string_view name)

◆ removeChildren()

void iv::file::xml::node::removeChildren ( )

◆ setText()

void iv::file::xml::node::setText ( const std::string_view text) const
inline

Member Data Documentation

◆ m_nodeName

std::string iv::file::xml::node::m_nodeName
private

The documentation for this class was generated from the following files: