bpp-phyl3  3.0.0
bpp::IOFrequencySetFactory Class Reference

Utilitary class for creating frequencies set readers and writers. More...

#include <Bpp/Phyl/Io/IoFrequencySetFactory.h>

+ Collaboration diagram for bpp::IOFrequencySetFactory:

Public Member Functions

 IOFrequencySetFactory ()
 Creates a new factory object. More...
 
virtual ~IOFrequencySetFactory ()
 
virtual IFrequencySetcreateReader (const std::string &format)
 Get a new dynamically created IFrequencySet object. More...
 
virtual OFrequencySetcreateWriter (const std::string &format)
 Get a new dynamically created OFrequencySet object. More...
 

Static Public Attributes

static const std::string BPPO_FORMAT = "Bpp0"
 

Detailed Description

Utilitary class for creating frequencies set readers and writers.

See also
IOSequenceFactory
IOTreeFactory

Definition at line 24 of file IoFrequencySetFactory.h.

Constructor & Destructor Documentation

◆ IOFrequencySetFactory()

bpp::IOFrequencySetFactory::IOFrequencySetFactory ( )
inline

Creates a new factory object.

Example:

IFrequencySet * freqReader = IOFrequencySetFactory().createReader(IOFrequencySetFactory::BPP_FORMAT);
FrequencySet * freqset = freqReader->read(...);
delete freqReader;
IOFrequencySetFactory()
Creates a new factory object.

Definition at line 40 of file IoFrequencySetFactory.h.

◆ ~IOFrequencySetFactory()

virtual bpp::IOFrequencySetFactory::~IOFrequencySetFactory ( )
inlinevirtual

Definition at line 41 of file IoFrequencySetFactory.h.

Member Function Documentation

◆ createReader()

IFrequencySet * IOFrequencySetFactory::createReader ( const std::string &  format)
virtual

Get a new dynamically created IFrequencySet object.

Parameters
formatThe input file format.
Returns
A pointer toward a new IFrequencySet object.
Exceptions
ExceptionIf the format name do not match any available format.

Definition at line 11 of file IoFrequencySetFactory.cpp.

References bpp::BppOFrequencySetFormat::ALL, and BPPO_FORMAT.

◆ createWriter()

OFrequencySet * IOFrequencySetFactory::createWriter ( const std::string &  format)
virtual

Get a new dynamically created OFrequencySet object.

Parameters
formatThe output file format.
Returns
A pointer toward a new OFrequencySet object.
Exceptions
ExceptionIf the format name do not match any available format.

Definition at line 19 of file IoFrequencySetFactory.cpp.

References bpp::BppOFrequencySetFormat::ALL, and BPPO_FORMAT.

Member Data Documentation

◆ BPPO_FORMAT

const std::string IOFrequencySetFactory::BPPO_FORMAT = "Bpp0"
static

Definition at line 27 of file IoFrequencySetFactory.h.

Referenced by createReader(), and createWriter().


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