A library for working with phylogenetic and population genetic data.
v0.32.0
CommonNodeData Class Reference

#include <genesis/tree/common_tree/tree.hpp>

Inherits BaseNodeData.

Inherited by PlacementNodeData, AttributeTreeNodeData, LayoutNodeData, MassTreeNodeData, and SimpleNewickNodeData.

Detailed Description

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< BaseNodeDataclone () const override
 Polymorphically copy an instance of this class. Use instead of copy constructor. More...
 
CommonNodeDataoperator= (CommonNodeData &&)=delete
 
virtual std::unique_ptr< BaseNodeDatarecreate () 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...
 
BaseNodeDataoperator= (BaseNodeData &&)=delete
 Deleted move assignment. More...
 

Static Public Member Functions

static std::unique_ptr< CommonNodeDatacreate ()
 
- Static Public Member Functions inherited from BaseNodeData
static std::unique_ptr< BaseNodeDatacreate ()
 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
 
CommonNodeDataoperator= (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...
 
BaseNodeDataoperator= (BaseNodeData const &)=default
 Protected copy assignment. Not used right now. More...
 

Constructor & Destructor Documentation

◆ ~CommonNodeData()

virtual ~CommonNodeData ( )
overridevirtualdefault

◆ CommonNodeData() [1/3]

CommonNodeData ( CommonNodeData &&  )
delete

◆ CommonNodeData() [2/3]

CommonNodeData ( )
protecteddefault

◆ CommonNodeData() [3/3]

CommonNodeData ( CommonNodeData const &  )
protecteddefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< BaseNodeData > clone ( ) const
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.

◆ create()

static std::unique_ptr< CommonNodeData > create ( )
inlinestatic

Definition at line 103 of file tree/common_tree/tree.hpp.

◆ operator=() [1/2]

CommonNodeData& operator= ( CommonNodeData &&  )
delete

◆ operator=() [2/2]

CommonNodeData& operator= ( CommonNodeData const &  )
protecteddefault

◆ recreate()

virtual std::unique_ptr< BaseNodeData > recreate ( ) const
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.

Member Data Documentation

◆ name

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.


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