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

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

Inherits BaseNodeData.

Inherited by PlacementNodeData, AttributeTreeNodeData, and LayoutNodeData.

Detailed Description

Default 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/default/tree.hpp.

Public Member Functions

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

Static Public Member Functions

static std::unique_ptr
< DefaultNodeData
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

 DefaultNodeData ()=default
 
 DefaultNodeData (DefaultNodeData const &)=default
 
DefaultNodeDataoperator= (DefaultNodeData 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

virtual ~DefaultNodeData ( )
virtualdefault
DefaultNodeData ( )
protecteddefault
DefaultNodeData ( DefaultNodeData const &  )
protecteddefault

Member Function Documentation

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 AttributeTreeNodeData, PlacementNodeData, and LayoutNodeData.

Definition at line 113 of file tree/default/tree.hpp.

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

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

DefaultNodeData& operator= ( DefaultNodeData &&  )
delete
DefaultNodeData& operator= ( DefaultNodeData const &  )
protecteddefault
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 AttributeTreeNodeData, PlacementNodeData, and LayoutNodeData.

Definition at line 108 of file tree/default/tree.hpp.

Member Data Documentation

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/default/tree.hpp.


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