bpp-phyl  2.2.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) throw (Exception)
 Get a new dynamically created ISubstitutionModel object. More...
 
virtual OSubstitutionModelcreateWriter (const std::string &format) throw (Exception)
 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 60 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;

Definition at line 77 of file IoSubstitutionModelFactory.h.

◆ ~IOSubstitutionModelFactory()

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

Definition at line 78 of file IoSubstitutionModelFactory.h.

Member Function Documentation

◆ createReader()

ISubstitutionModel * IOSubstitutionModelFactory::createReader ( const std::string &  format)
throw (Exception
)
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 46 of file IoSubstitutionModelFactory.cpp.

References bpp::BppOSubstitutionModelFormat::ALL.

◆ createWriter()

OSubstitutionModel * IOSubstitutionModelFactory::createWriter ( const std::string &  format)
throw (Exception
)
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 52 of file IoSubstitutionModelFactory.cpp.

References bpp::BppOSubstitutionModelFormat::ALL.

Member Data Documentation

◆ BPPO_FORMAT

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

Definition at line 63 of file IoSubstitutionModelFactory.h.


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