bpp-seq3  3.0.0
bpp::IODistanceMatrixFactory Class Reference

Utilitary class for creating distance matrix readers and writers. More...

#include <Bpp/Seq/Io/IoDistanceMatrixFactory.h>

+ Collaboration diagram for bpp::IODistanceMatrixFactory:

Public Member Functions

 IODistanceMatrixFactory ()
 Creates a new factory object. More...
 
virtual ~IODistanceMatrixFactory ()
 
virtual std::unique_ptr< IDistanceMatrixcreateReader (const std::string &format, bool extended=false)
 Get a new dynamically created IDistanceMatrix object. More...
 
virtual std::unique_ptr< ODistanceMatrixcreateWriter (const std::string &format, bool extended=false)
 Get a new dynamically created ODistanceMatrix object. More...
 

Static Public Attributes

static const std::string PHYLIP_FORMAT = "Phylip"
 

Detailed Description

Utilitary class for creating distance matrix readers and writers.

See also
IOSequenceFactory
IOTreeFactory

Definition at line 23 of file IoDistanceMatrixFactory.h.

Constructor & Destructor Documentation

◆ IODistanceMatrixFactory()

bpp::IODistanceMatrixFactory::IODistanceMatrixFactory ( )
inline

Creates a new factory object.

Example:

auto matReader = IODistanceMatrixFactory().createReader(IODistanceMatrixFactory::PHYLIP);
auto matrix = matReader->read("file.ph");
IODistanceMatrixFactory()
Creates a new factory object.

Definition at line 38 of file IoDistanceMatrixFactory.h.

◆ ~IODistanceMatrixFactory()

virtual bpp::IODistanceMatrixFactory::~IODistanceMatrixFactory ( )
inlinevirtual

Definition at line 39 of file IoDistanceMatrixFactory.h.

Member Function Documentation

◆ createReader()

unique_ptr< IDistanceMatrix > IODistanceMatrixFactory::createReader ( const std::string &  format,
bool  extended = false 
)
virtual

Get a new dynamically created IDistanceMatrix object.

Parameters
formatThe input file format, and whether names should be only less than 10 characters, or not (false=10 characters max).
extendedformat (default false).
Returns
A pointer toward a new IDistanceMatrix object.
Exceptions
ExceptionIf the format name do not match any available format.

Definition at line 13 of file IoDistanceMatrixFactory.cpp.

◆ createWriter()

unique_ptr< ODistanceMatrix > IODistanceMatrixFactory::createWriter ( const std::string &  format,
bool  extended = false 
)
virtual

Get a new dynamically created ODistanceMatrix object.

Parameters
formatThe output file format, and whether names should be only less than 10 characters, or not (false=10 characters max).
extendedformat (default false).
Returns
A pointer toward a new ODistanceMatrix object.
Exceptions
ExceptionIf the format name do not match any available format.

Definition at line 21 of file IoDistanceMatrixFactory.cpp.

Member Data Documentation

◆ PHYLIP_FORMAT

const std::string IODistanceMatrixFactory::PHYLIP_FORMAT = "Phylip"
static

Definition at line 26 of file IoDistanceMatrixFactory.h.


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