bpp-phyl3  3.0.0
bpp::IOSubstitutionModelFactory Class Reference

Utilitary class for creating substitution model readers and writers. More...

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

+ Collaboration diagram for bpp::IOSubstitutionModelFactory:

Public Member Functions

 IOSubstitutionModelFactory ()
 Creates a new factory object. More...
 
virtual ~IOSubstitutionModelFactory ()
 
virtual ISubstitutionModelcreateReader (const std::string &format)
 Get a new dynamically created ISubstitutionModel object. More...
 
virtual OSubstitutionModelcreateWriter (const std::string &format)
 Get a new dynamically created OSubstitutionModel object. More...
 

Static Public Attributes

static const std::string BPPO_FORMAT = "Bpp0"
 

Detailed Description

Utilitary class for creating substitution model readers and writers.

See also
IOSequenceFactory
IOTreeFactory

Definition at line 25 of file IoSubstitutionModelFactory.h.

Constructor & Destructor Documentation

◆ IOSubstitutionModelFactory()

bpp::IOSubstitutionModelFactory::IOSubstitutionModelFactory ( )
inline

Creates a new factory object.

Example:

ISubstitutionModel * modReader = IOSubstitutionModelFactory().createReader(IOSubstitutionModelFactory::BPP_FORMAT);
SubstitutionModel * model = modReader->read(...);
delete modReader;
IOSubstitutionModelFactory()
Creates a new factory object.

Definition at line 41 of file IoSubstitutionModelFactory.h.

◆ ~IOSubstitutionModelFactory()

virtual bpp::IOSubstitutionModelFactory::~IOSubstitutionModelFactory ( )
inlinevirtual

Definition at line 42 of file IoSubstitutionModelFactory.h.

Member Function Documentation

◆ createReader()

ISubstitutionModel * IOSubstitutionModelFactory::createReader ( const std::string &  format)
virtual

Get a new dynamically created ISubstitutionModel object.

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

Definition at line 11 of file IoSubstitutionModelFactory.cpp.

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

◆ createWriter()

OSubstitutionModel * IOSubstitutionModelFactory::createWriter ( const std::string &  format)
virtual

Get a new dynamically created OSubstitutionModel object.

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

Definition at line 19 of file IoSubstitutionModelFactory.cpp.

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

Member Data Documentation

◆ BPPO_FORMAT

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

Definition at line 28 of file IoSubstitutionModelFactory.h.

Referenced by createReader(), and createWriter().


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