#include <genesis/taxonomy/taxon_data.hpp>
Inherited by EntropyTaxonData.
Base class for storing data on Taxa of a Taxonomy.
This class provides the start point for the class hierarchy of taxon data classes. In order to correctly achieve polymorphic behaviour, and with its use case in a Taxonomy in mind, this class and its derived classes are only usable via unique pointers to their instances.
It thus provides a create() function instead of a default constructor. Stack copies of this class are useless; we always want a pointer to the class. For the same reason, instead of a copy constructor, it provides a clone() function.
It is recommended that derived classes follow the same access rules for its constructors.
Definition at line 56 of file taxon_data.hpp.
Public Member Functions | |
BaseTaxonData (BaseTaxonData &&)=delete | |
Deleted move constructor. More... | |
virtual | ~BaseTaxonData ()=default |
Virtual destructor. Needed for polymorphism. More... | |
virtual std::unique_ptr< BaseTaxonData > | clone () const |
Polymorphically copy an instance of this class. Use instead of copy constructor. More... | |
BaseTaxonData & | operator= (BaseTaxonData &&)=delete |
Deleted move assignment. More... | |
Static Public Member Functions | |
static std::unique_ptr< BaseTaxonData > | create () |
Create a new instance of this class. Use instead of default constructor. More... | |
Protected Member Functions | |
BaseTaxonData ()=default | |
Protected default constructor. Called from the create() function. More... | |
BaseTaxonData (BaseTaxonData const &)=default | |
Protected copy constructor. Called from the clone() function. More... | |
BaseTaxonData & | operator= (BaseTaxonData const &)=default |
Protected copy assignment. Not used right now. More... | |
|
virtualdefault |
Virtual destructor. Needed for polymorphism.
|
delete |
Deleted move constructor.
Not viable with polymorphism. Also, we don't need it. The data is held by pointer (in order to allow polymorphism in the first place), so we can simply move the pointer instead.
|
protecteddefault |
Protected default constructor. Called from the create() function.
|
protecteddefault |
Protected copy constructor. Called from the clone() function.
|
inlinevirtual |
Polymorphically copy an instance of this class. Use instead of copy constructor.
Reimplemented in EntropyTaxonData.
Definition at line 115 of file taxon_data.hpp.
|
inlinestatic |
Create a new instance of this class. Use instead of default constructor.
Definition at line 107 of file taxon_data.hpp.
|
delete |
Deleted move assignment.
Not viable with polymorphism. Also, we don't need it. The data is held by pointer (in order to allow polymorphism in the first place), so we can simply move the pointer instead.
|
protecteddefault |
Protected copy assignment. Not used right now.