A toolkit for working with phylogenetic data.
v0.24.0
XmlElement Class Reference

#include <genesis/utils/formats/xml/document.hpp>

Inherits XmlValue.

Inherited by XmlDocument.

Detailed Description

Definition at line 149 of file xml/document.hpp.

Public Member Functions

 XmlElement ()
 
 XmlElement (const std::string &tag)
 
 XmlElement (XmlElement const &)=delete
 
 XmlElement (XmlElement &&)=delete
 
virtual ~XmlElement () override
 
XmlCommentappend_comment (const std::string &comment)
 
XmlElementappend_element (const std::string &tag_value)
 
XmlMarkupappend_markup (const std::string &text)
 
void clear ()
 
XmlElementoperator= (XmlElement const &)=delete
 
XmlElementoperator= (XmlElement &&)=delete
 
- Public Member Functions inherited from XmlValue
virtual ~XmlValue ()
 
bool is_comment ()
 
bool is_element ()
 
bool is_markup ()
 
Type type () const
 
std::string type_to_string () const
 

Public Types

typedef std::unordered_map< std::string, std::string > StringMapType
 
- Public Types inherited from XmlValue
enum  Type { kComment, kMarkup, kElement }
 

Public Attributes

StringMapType attributes
 
std::vector< std::unique_ptr< XmlValue > > content
 
std::string tag
 

Additional Inherited Members

- Static Public Member Functions inherited from XmlValue
static std::string type_to_string (const Type t)
 
- Protected Member Functions inherited from XmlValue
 XmlValue (const Type type)
 Protected constructor that allows derived classes to set their value type. More...
 
- Protected Attributes inherited from XmlValue
const Type type_
 Stores the type of an object. Set by the constructor. More...
 

Constructor & Destructor Documentation

◆ XmlElement() [1/4]

XmlElement ( )
inline

Definition at line 158 of file xml/document.hpp.

◆ XmlElement() [2/4]

XmlElement ( const std::string &  tag)
inline

Definition at line 159 of file xml/document.hpp.

◆ XmlElement() [3/4]

XmlElement ( XmlElement const &  )
delete

◆ XmlElement() [4/4]

XmlElement ( XmlElement &&  )
delete

◆ ~XmlElement()

virtual ~XmlElement ( )
inlineoverridevirtual

Definition at line 167 of file xml/document.hpp.

Member Function Documentation

◆ append_comment()

XmlComment* append_comment ( const std::string &  comment)
inline

Definition at line 183 of file xml/document.hpp.

◆ append_element()

XmlElement* append_element ( const std::string &  tag_value)
inline

Definition at line 199 of file xml/document.hpp.

◆ append_markup()

XmlMarkup* append_markup ( const std::string &  text)
inline

Definition at line 191 of file xml/document.hpp.

◆ clear()

void clear ( )
inline

Definition at line 176 of file xml/document.hpp.

◆ operator=() [1/2]

XmlElement& operator= ( XmlElement const &  )
delete

◆ operator=() [2/2]

XmlElement& operator= ( XmlElement &&  )
delete

Member Typedef Documentation

◆ StringMapType

typedef std::unordered_map<std::string, std::string> StringMapType

Definition at line 152 of file xml/document.hpp.

Member Data Documentation

◆ attributes

StringMapType attributes

Definition at line 208 of file xml/document.hpp.

◆ content

std::vector<std::unique_ptr<XmlValue> > content

Definition at line 209 of file xml/document.hpp.

◆ tag

std::string tag

Definition at line 207 of file xml/document.hpp.


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