A toolkit for working with phylogenetic data.
v0.20.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XmlValue Class Reference

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

Inherited by XmlComment, XmlElement, and XmlMarkup.

Detailed Description

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

Public Member Functions

virtual ~XmlValue ()
 
bool is_comment ()
 
bool is_element ()
 
bool is_markup ()
 
Type type () const
 
std::string type_to_string () const
 

Static Public Member Functions

static std::string type_to_string (const Type t)
 

Public Types

enum  Type { kComment, kMarkup, kElement }
 

Protected Member Functions

 XmlValue (const Type type)
 Protected constructor that allows derived classes to set their value type. More...
 

Protected Attributes

const Type type_
 Stores the type of an object. Set by the constructor. More...
 

Constructor & Destructor Documentation

virtual ~XmlValue ( )
inlinevirtual

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

XmlValue ( const Type  type)
inlineprotected

Protected constructor that allows derived classes to set their value type.

Storing the type of each object as a special member saves the issue of using run time type inference, making it faster and easier to work with objects of different types.

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

Member Function Documentation

bool is_comment ( )
inline

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

bool is_element ( )
inline

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

bool is_markup ( )
inline

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

Type type ( ) const
inline

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

static std::string type_to_string ( const Type  t)
inlinestatic

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

std::string type_to_string ( ) const
inline

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

Member Enumeration Documentation

enum Type
Enumerator
kComment 
kMarkup 
kElement 

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

Member Data Documentation

const Type type_
protected

Stores the type of an object. Set by the constructor.

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


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