Utilitary class for creating tree readers and writers.
More...
#include <Bpp/Phyl/Io/IoTreeFactory.h>
Utilitary class for creating tree readers and writers.
- See also
- IOSequenceFactory
-
IODistanceMatrixFactory
Definition at line 54 of file IoTreeFactory.h.
◆ IOTreeFactory()
bpp::IOTreeFactory::IOTreeFactory |
( |
| ) |
|
|
inline |
Creates a new factory object.
Example:
ITree * treeReader =
IOTreeFactory().createReader(IOTreeFactory::NEWICK);
Tree * tree = treeReader->read("file.dnd");
delete treeReader;
Definition at line 73 of file IoTreeFactory.h.
◆ ~IOTreeFactory()
virtual bpp::IOTreeFactory::~IOTreeFactory |
( |
| ) |
|
|
inlinevirtual |
◆ createReader()
ITree * IOTreeFactory::createReader |
( |
const std::string & |
format | ) |
|
throw | ( | Exception |
| ) | | |
|
virtual |
Get a new dynamically created ITree object.
- Parameters
-
format | The input file format. |
- Returns
- A pointer toward a new ITree object.
- Exceptions
-
Exception | If the format name do not match any available format. |
Definition at line 51 of file IoTreeFactory.cpp.
◆ createWriter()
OTree * IOTreeFactory::createWriter |
( |
const std::string & |
format | ) |
|
throw | ( | Exception |
| ) | | |
|
virtual |
Get a new dynamically created OTree object.
- Parameters
-
format | The output file format. |
- Returns
- A pointer toward a new OTree object.
- Exceptions
-
Exception | If the format name do not match any available format. |
Definition at line 59 of file IoTreeFactory.cpp.
◆ NEWICK_FORMAT
const std::string IOTreeFactory::NEWICK_FORMAT = "Newick" |
|
static |
◆ NEXUS_FORMAT
const std::string IOTreeFactory::NEXUS_FORMAT = "Nexus" |
|
static |
◆ NHX_FORMAT
const std::string IOTreeFactory::NHX_FORMAT = "Nhx" |
|
static |
The documentation for this class was generated from the following files: