bpp-seq3
3.0.0
|
A Container template for objects that are accessible through names. More...
#include <Bpp/Seq/Container/NamedContainer.h>
Public Member Functions | |
NamedContainer () | |
virtual | ~NamedContainer () |
virtual size_t | getSize () const =0 |
Get the number of objects in the container. More... | |
virtual void | clear ()=0 |
Delete all objects in the container. More... | |
Protected Member Functions | |
virtual const std::shared_ptr< T > | getObject (const std::string &name) const =0 |
Retrieve an object from the container. More... | |
virtual std::shared_ptr< T > | getObject (const std::string &name)=0 |
virtual bool | hasObject (const std::string &name) const =0 |
Check if a object with a given name is present in the container. More... | |
virtual std::shared_ptr< T > | removeObject (const std::string &name)=0 |
Extract and remove a object from the container. More... | |
virtual void | deleteObject (const std::string &name)=0 |
Remove a object from the container. More... | |
virtual std::vector< std::string > | getObjectNames () const =0 |
Get all the names of the objects in the container. More... | |
A Container template for objects that are accessible through names.
The objects are all stored as shared pointers.
Definition at line 62 of file NamedContainer.h.
|
inline |
Definition at line 65 of file NamedContainer.h.
|
inlinevirtual |
Definition at line 66 of file NamedContainer.h.
|
pure virtual |
Delete all objects in the container.
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, bpp::MappedNamedContainer< T >, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
|
protectedpure virtual |
Remove a object from the container.
name | The name of the object. |
Implemented in bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, and bpp::MappedNamedContainer< T >.
|
protectedpure virtual |
Retrieve an object from the container.
name | The name of the object. |
Implemented in bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, and bpp::MappedNamedContainer< T >.
|
protectedpure virtual |
|
protectedpure virtual |
Get all the names of the objects in the container.
Implemented in bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, and bpp::MappedNamedContainer< T >.
|
pure virtual |
Get the number of objects in the container.
Implemented in bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, and bpp::MappedNamedContainer< T >.
|
protectedpure virtual |
Check if a object with a given name is present in the container.
name | The name of the object. |
Implemented in bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, and bpp::MappedNamedContainer< T >.
|
protectedpure virtual |
Extract and remove a object from the container.
name | The name of the object. |
Implemented in bpp::VectorMappedContainer< T >, bpp::VectorMappedContainer< Sequence >, bpp::VectorMappedContainer< ProbabilisticSequence >, and bpp::MappedNamedContainer< T >.