|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_FORMATS_XML_DOCUMENT_H_
2 #define GENESIS_UTILS_FORMATS_XML_DOCUMENT_H_
36 #include <unordered_map>
66 default :
return "Unknown";
185 auto elm = utils::make_unique<XmlComment>(comment);
186 auto ptr = elm.get();
187 content.push_back(std::move(elm));
193 auto elm = utils::make_unique<XmlMarkup>(text);
194 auto ptr = elm.get();
195 content.push_back(std::move(elm));
201 auto elm = utils::make_unique<XmlElement>(tag_value);
202 auto ptr = elm.get();
203 content.push_back(std::move(elm));
209 std::vector<std::unique_ptr<XmlValue>>
content;
249 #endif // include guard
const Type type_
Stores the type of an object. Set by the constructor.
XmlElement & operator=(XmlElement const &)=delete
const XmlElement * xml_value_to_element(const XmlValue *v)
Converts a pointer to an XmlValue to XmlElement if appropriate.
StringMapType declarations
const XmlComment * xml_value_to_comment(const XmlValue *v)
Converts a pointer to an XmlValue to XmlComment if appropriate.
Provides some valuable additions to STD.
virtual ~XmlDocument() override
XmlValue(const Type type)
Protected constructor that allows derived classes to set their value type.
std::vector< std::unique_ptr< XmlValue > > content
XmlMarkup(const std::string &content)
static std::string type_to_string(const Type t)
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
XmlElement * append_element(const std::string &tag_value)
XmlComment * append_comment(const std::string &comment)
std::unordered_map< std::string, std::string > StringMapType
virtual ~XmlElement() override
const XmlMarkup * xml_value_to_markup(const XmlValue *v)
Converts a pointer to an XmlValue to XmlMarkup if appropriate.
XmlMarkup * append_markup(const std::string &text)
std::string type_to_string() const
XmlElement(const std::string &tag)