Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
UtilsXML Class Reference

Base class for XML "nodes", to be data elements T for drain::Tree<T> More...

#include <UtilsXML.h>

Static Public Member Functions

template<typename T >
static T & assign (T &dst, const T &src)
 Assign another tree structure to another.
 
template<typename TX >
static TX & assign (TX &dst, const typename TX::xml_node_t &src)
 Copy node data to tree.
 
template<typename T , typename V >
static T & assign (T &tree, const V &arg)
 Assign property to a XML tree node.
 
template<typename T >
static T & assign (T &tree, std::initializer_list< std::pair< const char *, const Variable > > l)
 Tree.
 
template<typename TX >
static TX & assignString (TX &tree, const std::string &s)
 When assigning a string, create new element unless the element itself is of type CTEXT.
 
template<typename TX >
static TX & appendString (TX &tree, const std::string &s)
 
template<typename TX >
static TX & setType (TX &tree, const typename TX::node_data_t::xml_tag_t &type)
 
template<typename N >
static N::xml_tag_t retrieveDefaultType (const N &parentNode)
 Find node type (tag id) from a predefined list of default types for (some) parent types.
 
template<typename T >
static bool initChildWithDefaultType (const T &tree, T &child)
 

Detailed Description

Base class for XML "nodes", to be data elements T for drain::Tree<T>

Member Function Documentation

◆ assign() [1/4]

template<typename T >
static T & assign ( T &  dst,
const T &  src 
)
inlinestatic

Assign another tree structure to another.

Template Parameters
XML- xml tree structure (TreeXML, TreeSVG, TreeHTML)

◆ assign() [2/4]

template<typename T , typename V >
static T & assign ( T &  tree,
const V &  arg 
)
inlinestatic

Assign property to a XML tree node.

Template Parameters
T- XML tree

◆ assign() [3/4]

template<typename T >
static T & assign ( T &  tree,
std::initializer_list< std::pair< const char *, const Variable > >  l 
)
inlinestatic

Tree.

Template Parameters
TX- xml tree

◆ assign() [4/4]

template<typename TX >
static TX & assign ( TX &  dst,
const typename TX::xml_node_t &  src 
)
inlinestatic

Copy node data to tree.

Template Parameters
XML- xml tree structure (TreeXML, TreeSVG, TreeHTML)

◆ assignString()

template<typename TX >
static TX & assignString ( TX &  tree,
const std::string &  s 
)
inlinestatic

When assigning a string, create new element unless the element itself is of type CTEXT.

Returns
- text element (CTEXT): current or child element of the current element

Forward definition – type can be set only upon construction of a complete class

◆ setType()

template<typename TX >
static TX & setType ( TX &  tree,
const typename TX::node_data_t::xml_tag_t &  type 
)
inlinestatic

Forward definition – type can be set only upon construction of a complete class


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