12const std::string IOTreeFactory::NEWICK_FORMAT =
"Newick";
13const std::string IOTreeFactory::NEXUS_FORMAT =
"Nexus";
14const std::string IOTreeFactory::NHX_FORMAT =
"Nhx";
16std::unique_ptr<ITree> IOTreeFactory::createReader(
const std::string& format)
19 return std::make_unique<Newick>();
21 return std::make_unique<NexusIOTree>();
23 return std::make_unique<Nhx>();
25 throw Exception(
"Format " + format +
" is not supported for input.");
31 return std::make_unique<Newick>();
33 return std::make_unique<NexusIOTree>();
35 return std::make_unique<Nhx>();
37 throw Exception(
"Format " + format +
" is not supported for output.");
virtual std::unique_ptr< OTree > createWriter(const std::string &format)
Get a new dynamically created OTree object.
static const std::string NEXUS_FORMAT
static const std::string NHX_FORMAT
static const std::string NEWICK_FORMAT
Defines the basic types of data flow nodes.