#include <genesis/tree/common_tree/tree.hpp>
Inherits BaseNodeData.
Inherited by PlacementNodeData, AttributeTreeNodeData, LayoutNodeData, MassTreeNodeData, and SimpleNewickNodeData.
Common class containing the commonly needed data for tree nodes.
The Tree class can use all data for its nodes that derive from BaseNodeData. In most cases, nodes will contain the node's name and edges will contain a branch length.
This class is a default for node data, and can be derived from if a node name is wanted. It is however not necessary – so if there is no need for node names, you can provide your own, class for tree, as long as it also derives from BaseNodeData.
Definition at line 79 of file tree/common_tree/tree.hpp.
Public Member Functions | |
CommonNodeData (CommonNodeData &&)=delete | |
virtual | ~CommonNodeData () override=default |
virtual std::unique_ptr< BaseNodeData > | clone () const override |
Polymorphically copy an instance of this class. Use instead of copy constructor. More... | |
CommonNodeData & | operator= (CommonNodeData &&)=delete |
virtual std::unique_ptr< BaseNodeData > | recreate () const override |
Polymorphically create a default-constructed instance of this class with the same derived type as it was called on. More... | |
Public Member Functions inherited from BaseNodeData | |
BaseNodeData (BaseNodeData &&)=delete | |
Deleted move constructor. More... | |
virtual | ~BaseNodeData ()=default |
Virtual destructor. Needed for polymorphism. More... | |
BaseNodeData & | operator= (BaseNodeData &&)=delete |
Deleted move assignment. More... | |
Static Public Member Functions | |
static std::unique_ptr< CommonNodeData > | create () |
Static Public Member Functions inherited from BaseNodeData | |
static std::unique_ptr< BaseNodeData > | create () |
Create a new instance of this class. Use instead of default constructor. More... | |
Public Attributes | |
std::string | name |
Name of the node. More... | |
Protected Member Functions | |
CommonNodeData ()=default | |
CommonNodeData (CommonNodeData const &)=default | |
CommonNodeData & | operator= (CommonNodeData const &)=default |
Protected Member Functions inherited from BaseNodeData | |
BaseNodeData ()=default | |
Protected default constructor. Called from the create() function. More... | |
BaseNodeData (BaseNodeData const &)=default | |
Protected copy constructor. Called from the clone() function. More... | |
BaseNodeData & | operator= (BaseNodeData const &)=default |
Protected copy assignment. Not used right now. More... | |
|
overridevirtualdefault |
|
delete |
|
protecteddefault |
|
protecteddefault |
|
inlineoverridevirtual |
Polymorphically copy an instance of this class. Use instead of copy constructor.
Reimplemented from BaseNodeData.
Reimplemented in SimpleNewickNodeData, MassTreeNodeData, AttributeTreeNodeData, PlacementNodeData, and LayoutNodeData.
Definition at line 113 of file tree/common_tree/tree.hpp.
|
inlinestatic |
Definition at line 103 of file tree/common_tree/tree.hpp.
|
delete |
|
protecteddefault |
|
inlineoverridevirtual |
Polymorphically create a default-constructed instance of this class with the same derived type as it was called on.
Reimplemented from BaseNodeData.
Reimplemented in SimpleNewickNodeData, MassTreeNodeData, AttributeTreeNodeData, PlacementNodeData, and LayoutNodeData.
Definition at line 108 of file tree/common_tree/tree.hpp.
std::string name |
Name of the node.
In case it is a leaf, this is usually the name of the taxon represented by the node.
Definition at line 127 of file tree/common_tree/tree.hpp.