Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Attributes | Friends | List of all members
NodeXML< T > Class Template Reference

#include <TreeXML.h>

Inheritance diagram for NodeXML< T >:
Inheritance graph
[legend]
Collaboration diagram for NodeXML< T >:
Collaboration graph
[legend]

Classes

class  Elem
 A "handle" for specialized element classes, i.e. with members like width , height or radius . More...
 
class  Elem< image::svg::tag_t::CIRCLE >
 
class  Elem< image::svg::tag_t::RECT >
 

Public Types

typedef T elem_t
 Tag type, CTEXT or COMMENT.
 
typedef NodeXML< T > xml_node_t
 
typedef UnorderedMultiTree< NodeXML< T >, false, path_txml_tree_t
 
typedef std::map< T, std::string > tag_map_t
 
typedef T xml_tag_t
 
typedef NodeXML< T > xml_node_t
 
typedef drain::Path< std::string,'/'> path_t
 
typedef UnorderedMultiTree< xml_node_t, false, path_txml_tree_t
 
typedef std::map< xml_tag_t, xml_tag_t > xml_default_elem_map_t
 Helps creating child elements. Like children of HTML element UL should be LI.
 
- Public Types inherited from XML
enum  entity_t {
  AMPERSAND = '&' , LESS_THAN = '<' , EQUAL_TO = '=' , GREATER_THAN = '>' ,
  NONBREAKABLE_SPACE = ' ' , QUOTE = '"' , CURLY_LEFT = '{' , CURLY_RIGHT = '}' ,
  TAB = '\t' , NEWLINE = '\n'
}
 
enum  tag_display_mode {
  FLEXIBLE_TAG = 0 , OPENING_TAG = 1 , CLOSING_TAG = 2 , EMPTY_TAG = OPENING_TAG | CLOSING_TAG ,
  NON_EMPTY_TAG
}
 
typedef ReferenceMap2< FlexibleVariablemap_t
 
typedef drain::Path< std::string,'/'> path_t
 Tree path type.
 
typedef path_t::elem_t path_elem_t
 
typedef std::list< path_tpath_list_t
 
typedef int intval_t
 
typedef ReferenceMap2< FlexibleVariablemap_t
 User may optionally filter attributes and CTEST with this using StringTools::replace(XML::encodingMap);.
 

Public Member Functions

 NodeXML (const elem_t &t=elem_t(0))
 
 NodeXML (const NodeXML &node)
 
virtual void setType (const elem_t &t)
 
const elem_tgetType () const
 
bool typeIs (const elem_t &t) const
 
bool isComment () const
 
bool isCText () const
 
bool isUndefined () const
 
bool isSelfClosing () const
 
const std::string & getTag () const
 
void set (const NodeXML &node)
 
void set (const elem_t &type)
 
void set (const std::string &s)
 
void set (const char *s)
 
void set (const drain::Castable &s)
 
void set (const std::initializer_list< Variable::init_pair_t > &l)
 
template<class X >
void set (const std::map< std::string, X > &args)
 
template<class V >
void set (const std::string &key, const V &value)
 
NodeXMLoperator= (const T &x)
 
NodeXMLoperator= (const Castable &c)
 
NodeXMLoperator= (const std::string &s)
 
NodeXMLoperator= (const char *s)
 
NodeXMLoperator= (const std::initializer_list< std::pair< const char *, const drain::Variable > > &l)
 
NodeXMLsetComment (const std::string &text="")
 Make this node a comment. Contained tree will not be delete. In current version, attributes will be rendered.
 
template<class S >
NodeXMLsetText (const S &value)
 Assign the text content of this node. If the node type is undefined, set it to CTEXT.
 
NodeXMLsetText (const char *value)
 
template<class S >
void setStyle (const S &value)
 
void setStyle (const std::string &value)
 
void setStyle (const char *value)
 
void setStyle (const std::string &key, const std::string &value)
 
template<class V >
void setStyle (const std::string &key, const std::initializer_list< V > &l)
 Set style of an element.
 
template<class V >
void setStyle (const std::string &key, const V &value)
 For element/class/id, assign ...
 
void setStyle (const std::initializer_list< std::pair< const char *, const drain::Variable > > &l)
 
 NodeXML ()
 Default constructor.
 
 NodeXML (const NodeXML &node)
 Copy constructor.
 
getNativeType () const
 
virtual const std::string & getTag () const
 
void set (const NodeXML &node)
 
void set (const intval_t &type)
 
void set (const std::string &s)
 
void set (const char *s)
 
void set (const drain::Castable &s)
 
void set (const std::initializer_list< std::pair< const char *, const Variable > > &args)
 
template<class V >
void set (const std::map< std::string, V > &args)
 
template<class V >
void set (const std::string &key, const V &value)
 
NodeXMLoperator= (const NodeXML &node)
 
NodeXMLoperator= (const xml_tag_t &x)
 
NodeXMLoperator= (const Castable &c)
 
NodeXMLoperator= (const std::string &s)
 
NodeXMLoperator= (const char *s)
 
NodeXMLoperator= (const std::initializer_list< std::pair< const char *, const drain::Variable > > &l)
 
virtual std::ostream & nodeToStream (std::ostream &ostr, tag_display_mode mode=EMPTY_TAG) const override
 Dumps info. Future option: outputs leading and ending tag.
 
std::map< int, std::string > tags
 
template<class T >
std::ostream & toStream (std::ostream &ostr, const T &tree, const std::string &defaultTag, int indent)
 XML output function shared for all XML documents, ie versions defined in subclasses.
 
const NodeXML< drain::image::SLD::tag_t >::xml_default_elem_map_t xml_default_elems
 
const NodeXML< image::SLD::tag_t >::xml_default_elem_map_t xml_default_elems
 
const NodeXML< drain::image::svg::tag_t >::xml_default_elem_map_t xml_default_elems
 
const NodeXML< image::svg::tag_t >::xml_default_elem_map_t xml_default_elems
 
const NodeXML< Html::tag_t >::xml_default_elem_map_t xml_default_elems
 
std::ostream & docTypeToStream (std::ostream &ostr)
 
const NodeXML< Html::tag_t >::xml_default_elem_map_t xml_default_elems
 
const NodeXML< int >::xml_default_elem_map_t xml_default_elems
 
const std::string & getTag () const
 
- Public Member Functions inherited from XML
void setId ()
 Makes ID a visible attribute.
 
void setId (const std::string &s)
 Makes ID a visible attribute, with a given value.
 
template<char C = '\0', typename ... TT>
void setId (const TT &...args)
 
const std::string & getId () const
 Returns ID of this element. Hopefully a unique ID...
 
bool empty () const
 
const map_tgetAttributes () const
 
map_tgetAttributes ()
 
virtual void setAttribute (const std::string &key, const std::string &value)
 Default implementation. Needed for handling units in strings, like "50%" or "640px".
 
virtual void setAttribute (const std::string &key, const char *value)
 Default implementation. Needed for handling units in strings, like "50%" or "640px".
 
template<class V >
void setAttribute (const std::string &key, const V &value)
 "Final" implementation.
 
void remove (const std::string &s)
 
const drain::FlexibleVariableget (const std::string &key) const
 
drain::FlexibleVariableget (const std::string &key)
 
template<class V >
get (const std::string &key, const V &defaultValue) const
 
std::string get (const std::string &key, const char *defaultValue) const
 
template<typename ... TT>
void addClass (const TT &... args)
 Style class.
 
template<class V >
bool hasClass (const V &cls) const
 
void removeClass (const std::string &s)
 
void clearClasses ()
 
 XML (const XML &)
 
template<class T >
void setType (const T &t)
 
const intval_t & getType () const
 
bool typeIsSet () const
 Return true, if type is any of the arguments.
 
template<class T2 , class ... T3>
bool typeIs (const T2 &arg, const T3... args) const
 Return true, if type is any of the arguments.
 
bool isUndefined () const
 
bool isComment () const
 
bool isCText () const
 
bool isStyle () const
 
bool isScript () const
 
virtual bool isSingular () const
 Tell if this element should always have an explicit closing tag even when empty, like <STYLE></STYLE>
 
virtual bool isExplicit () const
 Tell if this element should always have an explicit closing tag even when empty, like <STYLE></STYLE>
 
void reset ()
 Keep the element type but clear style, class and string data.
 
void setId ()
 Makes ID a visible attribute.
 
void setId (const std::string &s)
 Makes ID a visible attribute, with a given value.
 
template<char C = '\0', typename ... TT>
void setId (const TT &...args)
 Concatenates arguments to an id.
 
const std::string & getId () const
 Returns ID of this element. Hopefully a unique ID...
 
template<class ... T>
void setComment (const T &...args)
 Make this node a comment. Contained tree will not be deleted. In current version, attributes WILL be rendered.
 
virtual void setText (const std::string &s)
 Assign the text content of this node. If the node type is undefined, set it to CTEXT.
 
template<class ... T>
void setText (const T &...args)
 
template<class ... T>
void setTextSafe (const T &...args)
 
virtual const std::string & getText () const
 
const std::string & getUrl ()
 
void setUrl (const std::string &s)
 
template<class ... T>
void setName (const T &...args)
 
virtual bool empty () const
 
const map_tgetAttributes () const
 
map_tgetAttributes ()
 
const drain::FlexibleVariableget (const std::string &key) const
 
drain::FlexibleVariableget (const std::string &key)
 
template<class V >
get (const std::string &key, const V &defaultValue) const
 
std::string get (const std::string &key, const char *defaultValue) const
 
virtual void setAttribute (const std::string &key, const std::string &value)
 Default implementation. Needed for handling units in strings, like "50%" or "640px".
 
virtual void setAttribute (const std::string &key, const char *value)
 Default implementation. Needed for handling units in strings, like "50%" or "640px".
 
template<class V >
void setAttribute (const std::string &key, const V &value)
 "Final" implementation.
 
void removeAttribute (const std::string &s)
 
const StyleXMLgetStyle () const
 
void setStyle (const StyleXML &s)
 
void setStyle (const std::string &value)
 
void setStyle (const char *value)
 
void setStyle (const std::string &key, const std::string &value)
 
template<class V >
void setStyle (const std::string &key, const std::initializer_list< V > &l)
 Set style of an element.
 
template<class V >
void setStyle (const std::string &key, const V &value)
 For element/class/id, assign ...
 
void setStyle (const std::initializer_list< std::pair< const char *, const drain::Variable > > &args)
 
const ClassListXMLgetClasses () const
 
template<typename ... TT>
void addClass (const TT &... args)
 
template<class V >
bool hasClass (const V &cls) const
 
void removeClass (const std::string &s)
 
void clearClasses ()
 
virtual void specificAttributesToStream (std::ostream &ostr) const
 
template<class T >
bool findById (const T &t, const std::string &id, typename T::path_t &result, const typename T::path_t &path)
 
template<class T >
bool findById (const T &t, const std::string &id, NodeXML<>::path_list_t &result, const path_t &path)
 
template<class T , class N >
bool findByTag (const T &t, const N &tag, NodeXML<>::path_list_t &result, const path_t &path)
 
template<class T , class N >
bool findByTags (const T &t, const std::set< N > &tags, NodeXML<>::path_list_t &result, const path_t &path)
 
template<class T2 , class C >
bool findByClass (const T2 &t, const C &cls, XML::path_list_t &result, const path_t &path)
 

Static Public Member Functions

static const std::string & getTag (unsigned int index)
 
template<class V >
static std::ostream & docToStream (std::ostream &ostr, const V &tree)
 
template<class V >
static std::ostream & toStream (std::ostream &ostr, const V &t, const std::string &defaultTag="", int indent=0)
 "Forward definition" of Tree::toOstream
 
static std::ostream & docTypeToStream (std::ostream &ostr)
 Write the XML definition beginning any XML document.
 
template<int E>
static const std::pair< key_t, NodeXML< T > > & entry ()
 
static const std::string & getTag (const T &type)
 
template<class V >
static std::ostream & docToStream (std::ostream &ostr, const V &tree)
 
static std::ostream & docTypeToStream (std::ostream &ostr)
 Write the XML definition beginning any XML document.
 
- Static Public Member Functions inherited from XML
template<class V >
static void attribToStream (std::ostream &ostr, const std::string &key, const V &value)
 
static int getCount ()
 
template<class V >
static bool findById (const V &tree, const std::string &tag, typename V::path_t &result, const typename V::path_t &path=path_t())
 Find the first occurrence of given id using recursive breath-first search.
 
template<class V >
static bool findById (const V &tree, const std::string &tag, path_list_t &result, const path_t &path=path_t())
 Find the occurrence(s) of given ID using recursive breath-first search.
 
template<class V , class T >
static bool findByTag (const V &tree, const T &tag, path_list_t &result, const path_t &path=path_t())
 
template<class V , class T >
static bool findByTags (const V &tree, const std::set< T > &tags, path_list_t &result, const path_t &path=path_t())
 "Forward definition"
 
template<class T2 , class C >
static bool findByClass (const T2 &t, const C &cls, std::list< path_elem_t > &result)
 Finds child elements in an XML structure by class name.
 
template<class V , class C >
static bool findByClass (const V &t, const C &cls, path_list_t &result, const path_t &path=path_t())
 Finds elements recursively in an XML structure by class name supplied as an enumeration type.
 
static const std::map< char, std::string > & getKeyConversionMap ()
 Characters that must be avoided in XML attribute keys: space, tab, =.
 
static const std::map< char, std::string > & getAttributeConversionMap ()
 Characters that must be avoided in XML attribute values: ".
 
static const std::map< char, std::string > & getCTextConversionMap ()
 Characters to avoid in XML free text: <, >, {, },.
 
static int getCount ()
 
template<class TR >
static std::ostream & toStream (std::ostream &ostr, const TR &tree, const std::string &defaultTag="ELEM", int indent=0)
 
static const std::map< char, std::string > & getEntityMap ()
 Handy map for converting characters to XML entities. Example: '&' -> "&amp;".
 
template<class V >
static void xmlAttribToStream (std::ostream &ostr, const std::string &key, const V &value)
 Handy map for converting characters to XML entities. Example: '&' -> "&amp;".
 
template<typename T >
static T & xmlAssign (T &dst, const T &src)
 Assign another tree structure to another.
 
template<typename TX >
static TX & xmlAssign (TX &dst, const typename TX::xml_node_t &src)
 Copy node data to tree.
 
template<typename N >
static N & xmlAssignNode (N &dst, const N &src)
 Assign tree node (data) to another.
 
template<typename T , typename V >
static T & xmlAssign (T &tree, const V &arg)
 Assign property to a XML tree node.
 
template<typename T >
static T & xmlAssign (T &tree, std::initializer_list< std::pair< const char *, const Variable > > l)
 Tree.
 
template<typename TX >
static TX & xmlAssignString (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 & xmlAppendString (TX &tree, const std::string &s)
 
template<typename TX >
static TX & xmlSetType (TX &tree, const typename TX::node_data_t::xml_tag_t &type)
 
template<typename T >
static T & xmlAddChild (T &tree, const std::string &key)
 
template<typename N >
static N::xml_tag_t xmlRetrieveDefaultType (const N &parentNode)
 

Public Attributes

elem_t type
 
- Public Attributes inherited from XML
std::string id
 Some general-purpose.
 
std::string ctext
 
std::string url
 
ClassListXML classList
 
StyleXML style
 

Static Public Attributes

static tag_map_t tags
 
static const xml_default_elem_map_t xml_default_elems
 
- Static Public Attributes inherited from XML
static const int UNDEFINED = 0
 
static const int COMMENT = 1
 
static const int CTEXT = 2
 
static const int STYLE = 3
 
static const int SCRIPT = 4
 
static int nextID = 0
 
static const intval_t UNDEFINED = 0
 
static const intval_t COMMENT = 1
 
static const intval_t CTEXT = 2
 
static const intval_t SCRIPT = 3
 
static const intval_t STYLE = 4
 
static const intval_t STYLE_SELECT = 5
 

Protected Types

typedef std::map< std::string, std::string > xmldoc_attrib_map_t
 
typedef std::list< std::pair< std::string, std::string > > xmldoc_attrib_map_t
 Internal function called after setType()
 
- Protected Types inherited from ReferenceMap2< FlexibleVariable >
enum  extLinkPolicy
 
typedef FlexibleVariable ref_t
 
typedef SmartMap< FlexibleVariablemap_t
 
- Protected Types inherited from SmartMap< T >
typedef SmartMap< T > smap_t
 
typedef std::map< std::string, T > map_t
 
typedef map_t::key_type key_t
 
typedef map_t::mapped_type value_t
 
typedef map_t::value_type entry_t
 
typedef std::list< std::string > keylist_t
 
typedef map_t::iterator iterator
 Needed?
 
typedef map_t::const_iterator const_iterator
 

Protected Member Functions

NodeXML< int >::xmldoc_attrib_map_t xmldoc_attribs
 
NodeXML< int >::xmldoc_attrib_map_t xmldoc_attribs
 
- Protected Member Functions inherited from XML
bool typeIs () const
 
virtual void handleType ()
 
- Protected Member Functions inherited from ReferenceMap2< FlexibleVariable >
ref_tlink (const std::string &key, F &x)
 Associates a map entry with a variable.
 
ref_tlink (const std::string &key, void *ptr, const std::type_info &type, size_t count=1)
 Create a reference to a basic type or std::string. (Also for basetype arrays.)
 
void unlink (const std::string &key)
 
void copyStruct (const ReferenceMap2< FlexibleVariable > &m, const T2 &src, T2 &dst, extLinkPolicy policy=RESERVE)
 Experimental. Copies references and values of a structure to another.
 
- Protected Member Functions inherited from SmartMap< T >
 SmartMap (char separator='\0', char arraySeparator=':')
 
 SmartMap (const SmartMap &smap)
 
virtual void clear ()
 
bool hasKey (const std::string &key) const
 
std::string get (const std::string &key, const std::string &defaultValue) const
 Retrieves a value, or default value if value is unset.
 
std::string get (const std::string &key, const char *defaultValue) const
 
template<class T2 >
T2 get (const std::string &key, const T2 &defaultValue) const
 Retrieves a value, if set, else returns the given default value.
 
virtual T & operator[] (const std::string &key)
 Returns an element. Creates one, conditionally.
 
virtual const T & operator[] (const std::string &key) const
 Unlike with std::map, operator[] const is defined, returning reference to a static empty instance.
 
virtual const keylist_t & getKeyList () const
 Derived versions may produce an ordered set of keys.
 
const map_t & getMap () const
 
template<class T2 >
void exportMap (std::map< std::string, T2 > &m) const
 Copies the contents to another map.
 
template<bool STRICT = true>
void importEntries (const std::string &entries, char assignmentSymbol='=', char separatorSymbol=0)
 Assigns a value to given key; if the entry does not exist, tries to create it with directly with operator[].
 
template<bool STRICT = true>
void importEntries (const std::list< std::string > &entries, char assignmentSymbol='=')
 
template<class S , bool STRICT = true>
void importMap (const std::map< std::string, S > &m)
 Assign values from a map, overriding existing entries.
 
template<class T2 , bool STRICT = true>
void importCastableMap (const drain::SmartMap< T2 > &m)
 Assign values from a map, possibly extending the map.
 
template<class T2 >
void updateFromMap (const std::map< std::string, T2 > &m)
 Assign values from a map. Updates existing entries only.
 
template<class T2 >
void updateFromCastableMap (const drain::SmartMap< T2 > &m)
 Convenience.
 
void setValues (const std::string &entries, char assignmentSymbol='=', char separatorSymbol=0)
 Sets values. If strictness==STRICTLY_CLOSED, throws exception if tries to assign a non-existing entry.
 
void setValues (const char *entries, char assignmentSymbol='=', char separatorSymbol=0)
 
template<class S >
void setValuesSEQ (const S &sequence)
 
void updateValues (const std::string &entries, char assignmentSymbol='=', char separatorSymbol=0)
 Sets applicable values ie. modifies existing entries only. In ordered maps, skips extra entries silently.
 
void getKeys (std::ostream &ostr) const
 
std::string getKeys () const
 Convenience function for std::string output.
 
void getValues (std::ostream &ostr) const
 Dumps the values.
 
std::string getValues () const
 Convenience function for std::string output.
 
std::ostream & toStream (std::ostream &ostr, char equal='=', char startChar='{', char endChar='}', char separatorChar=',') const
 Note: parameters discarded.
 
std::string toStr (char equal='=', char start=0, char end=0, char separator=0) const
 
void dump (std::ostream &ostr=std::cout) const
 Write map as a JSON code.
 

Static Protected Attributes

static xmldoc_attrib_map_t xmldoc_attribs
 

Friends

template<T ELEM>
class Elem
 Provides access to ReferenceMap2 of XML elements, to link FlexibleVariables.
 

Additional Inherited Members

- Protected Attributes inherited from XML
intval_t type = XML::UNDEFINED
 
- Protected Attributes inherited from SmartMap< T >
std::list< std::string > keyList
 Assigns values from std::string of type "value,value2,...valueN".
 
char separator
 Default character used for splitting input and output. See setValues.
 
char arraySeparator
 Default separator character for array elements (std::vector's)
 

Detailed Description

template<class T = int>
class drain::NodeXML< T >
Template Parameters
T- index type; may be enum.

Member Typedef Documentation

◆ xmldoc_attrib_map_t

template<class T = int>
typedef std::list<std::pair<std::string,std::string> > xmldoc_attrib_map_t
protected

Internal function called after setType()

Originally called after setType(), but involves as forward-init problem, a class should not poke members through its constructor. NOTE: these could/should be templated, in TreeXML<...> right?

Constructor & Destructor Documentation

◆ NodeXML() [1/2]

template<class T = int>
NodeXML ( )
inline

Default constructor.

In derived classes, handleType(static_cast<T>(t)) should be always called by constructor.

◆ NodeXML() [2/2]

template<class T = int>
NodeXML ( const NodeXML< T > &  node)
inline

Copy constructor.

In derived classes, handleType(static_cast<T>(t)) should be always called by constructor.

Use always default constructor in derived classes? Assign node can violate/invalidate link() pointers?

Member Function Documentation

◆ docToStream()

template<class T = int>
template<class V >
static std::ostream & docToStream ( std::ostream &  ostr,
const V &  tree 
)
inlinestatic

Finds elements in an XML structure by class name. Finds elements in an XML structure by class name. Redirects to findByClass(t, std::string(cls),

◆ docTypeToStream() [1/2]

template<class T = int>
static std::ostream & docTypeToStream ( std::ostream &  ostr)
inlinestatic

Write the XML definition beginning any XML document.

Each derived class should have a definition compatible with the structure generated by the class.

◆ docTypeToStream() [2/2]

template<class T = int>
static std::ostream & docTypeToStream ( std::ostream &  ostr)
inlinestatic

Write the XML definition beginning any XML document.

Each derived class should have a definition compatible with the structure generated by the class.

To override, use specialization of the template(d) base type:

template <>
std::ostream & NodeXML<BaseHTML::tag_t>::docTypeToStream(std::ostream &ostr){
ostr << "<!DOCTYPE html>\n";
return ostr;
}
static std::ostream & docTypeToStream(std::ostream &ostr)
Write the XML definition beginning any XML document.
Definition TreeXML.h:751

◆ getTag() [1/2]

template<class T = int>
virtual const std::string & getTag ( ) const
inlinevirtual

This function should not be called upon construction, as the dictionary does not exist.

◆ getTag() [2/2]

template<class T = int>
static const std::string & getTag ( const T &  type)
inlinestatic

This function should not be called upon construction. Consider dynamic getDict() to skip

◆ nodeToStream()

template<class N >
std::ostream & nodeToStream ( std::ostream &  ostr,
tag_display_mode  mode = EMPTY_TAG 
) const
overridevirtual

Dumps info. Future option: outputs leading and ending tag.

See also
XML::toStream()

Implements XML.

◆ set()

template<class T = int>
void set ( const std::initializer_list< std::pair< const char *, const Variable > > &  args)
inline

drain::SmartMapTools::setValues(getAttributes(), l); // add new keys

◆ setComment()

template<class T = int>
NodeXML & setComment ( const std::string &  text = "")
inline

Make this node a comment. Contained tree will not be delete. In current version, attributes will be rendered.

Parameters
text- if given, replaces current CTEXT.

◆ setStyle()

template<class T = int>
template<class V >
void setStyle ( const std::string &  key,
const std::initializer_list< V > &  l 
)
inline

Set style of an element.

rect.setStyle("dash-array",{2,5,3});

◆ setText()

template<class T = int>
template<class S >
NodeXML & setText ( const S &  value)
inline

Assign the text content of this node. If the node type is undefined, set it to CTEXT.

Parameters
text- assigned to text content.

◆ toStream()

template<class T = int>
template<class T >
std::ostream & toStream ( std::ostream &  ostr,
const T &  tree,
const std::string &  defaultTag,
int  indent 
)

XML output function shared for all XML documents, ie versions defined in subclasses.

TODO: preamble/prologToStream()

Parameters
defaultTag- important for

iterate children - note the use of default tag


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