|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TREE_COMMON_TREE_PHYLOXML_WRITER_H_
2 #define GENESIS_TREE_COMMON_TREE_PHYLOXML_WRITER_H_
102 auto name_e = utils::make_unique< utils::XmlElement >(
"name" );
103 name_e->append_markup(name);
104 element.
content.push_back(std::move(name_e));
110 auto bl_e = utils::make_unique< utils::XmlElement >(
"branch_length" );
112 element.
content.push_back(std::move(bl_e));
140 #endif // include guard
std::vector< edge_to_element_function > edge_to_element_plugins
Collect all functions to be called for each TreeEdge in order to translate it to a Phyloxml represent...
std::vector< node_to_element_function > node_to_element_plugins
Collect all functions to be called for each TreeNode in order to translate it to a Phyloxml represent...
double length(Tree const &tree)
Get the length of the tree, i.e., the sum of all branch lengths.
CommonTreePhyloxmlWriterPlugin()=default
std::string to_string(GenomeLocus const &locus)
CommonTreePhyloxmlWriterPlugin & operator=(CommonTreePhyloxmlWriterPlugin const &)=default
virtual ~CommonTreePhyloxmlWriterPlugin()=default
std::vector< std::unique_ptr< XmlValue > > content
double branch_length
Branch length of the edge.
void register_with(PhyloxmlWriter &writer) const
std::string name
Name of the node.
Write a Tree to Phyloxml format.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Common class containing the commonly needed data for tree edges.
Common class containing the commonly needed data for tree nodes.
A collection of classes for working with XML documents. See XmlDocument for more.
CommonTreePhyloxmlWriter()
void edge_to_element(TreeEdge const &edge, utils::XmlElement &element) const
void node_to_element(TreeNode const &node, utils::XmlElement &element) const