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

#include <genesis/tree/formats/newick/color_writer_plugin.hpp>

Inherits ColorWriterPlugin.

Detailed Description

Plugin class for Newick output that allows coloring of edges.

The effect of this class on the Newick output is that (if enabled) a color tag comment will be added to each Newick element like this: [&!color=#c0ffee].

For more information, see ColorWriterPlugin class.

Definition at line 58 of file newick/color_writer_plugin.hpp.

Public Member Functions

 NewickColorWriterPlugin ()=default
 
 NewickColorWriterPlugin (NewickColorWriterPlugin const &)=default
 
 NewickColorWriterPlugin (NewickColorWriterPlugin &&)=default
 
virtual ~NewickColorWriterPlugin ()=default
 
void color_tag_prefix (std::string prefix)
 Set the prefix string that is used within the Newick comment before the actual color value. More...
 
std::string color_tag_prefix () const
 Get the currently set prefix string. See the setter for more information. More...
 
void color_tag_suffix (std::string suffix)
 Set the suffix string that is used within the Newick comment after the actual color value. More...
 
std::string color_tag_suffix () const
 Get the currently set suffix string. See the setter for more information. More...
 
void edge_to_element (TreeEdge const &edge, NewickBrokerElement &element) const
 
NewickColorWriterPluginoperator= (NewickColorWriterPlugin const &)=default
 
NewickColorWriterPluginoperator= (NewickColorWriterPlugin &&)=default
 
void prepare_writing (Tree const &tree, NewickBroker &broker) const
 
void register_with (NewickWriter &writer) const
 
- Public Member Functions inherited from ColorWriterPlugin
virtual ~ColorWriterPlugin ()
 
void edge_colors (std::vector< utils::Color > const &color_vector)
 Set the edge colors that shall be written to the output. More...
 
std::vector< utils::Color > const & edge_colors () const
 Return the edge colors that are currently set. More...
 
void enable_color (bool value)
 Set whether colors tags are written to the output. More...
 
bool enable_color () const
 Returns whether colors tags are written to the output. More...
 
void ignored_color (utils::Color value)
 Set a color that is used as marker for partially disabling the output of color tags. More...
 
utils::Color ignored_color () const
 Return the currently set ignored color. See the setter for more information. More...
 
void use_ignored_color (bool value)
 Set whether to use the ignored_color(). More...
 
bool use_ignored_color () const
 Return whether currently an ignored color is used. More...
 

Constructor & Destructor Documentation

virtual ~NewickColorWriterPlugin ( )
virtualdefault

Member Function Documentation

void color_tag_prefix ( std::string  prefix)
inline

Set the prefix string that is used within the Newick comment before the actual color value.

By default, this string is set to &!color=, which is for example used by FigTree to mark color in trees. This will result in a Newick comment like [&!color=#c0ffee].

Definition at line 86 of file newick/color_writer_plugin.hpp.

std::string color_tag_prefix ( ) const
inline

Get the currently set prefix string. See the setter for more information.

Definition at line 94 of file newick/color_writer_plugin.hpp.

void color_tag_suffix ( std::string  suffix)
inline

Set the suffix string that is used within the Newick comment after the actual color value.

By default, this string is empty. See the setter color_tag_prefix() for more information.

Definition at line 105 of file newick/color_writer_plugin.hpp.

std::string color_tag_suffix ( ) const
inline

Get the currently set suffix string. See the setter for more information.

Definition at line 113 of file newick/color_writer_plugin.hpp.

void edge_to_element ( TreeEdge const &  edge,
NewickBrokerElement element 
) const
inline

Definition at line 141 of file newick/color_writer_plugin.hpp.

NewickColorWriterPlugin& operator= ( NewickColorWriterPlugin const &  )
default
NewickColorWriterPlugin& operator= ( NewickColorWriterPlugin &&  )
default
void prepare_writing ( Tree const &  tree,
NewickBroker broker 
) const
inline

Definition at line 122 of file newick/color_writer_plugin.hpp.

void register_with ( NewickWriter writer) const
inline

Definition at line 154 of file newick/color_writer_plugin.hpp.


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