53 if (format == NEWICK_FORMAT)
return new Newick();
54 else if (format == NEXUS_FORMAT)
return new NexusIOTree();
55 else if (format == NHX_FORMAT)
return new Nhx();
56 else throw Exception(
"Format " + format +
" is not supported for input.");
61 if (format == NEWICK_FORMAT)
return new Newick();
62 else if (format == NEXUS_FORMAT)
return new NexusIOTree();
63 else if (format == NHX_FORMAT)
return new Nhx();
64 else throw Exception(
"Format " + format +
" is not supported for output.");
a simple parser for reading trees from a Nexus file.
The so-called 'Nhx - New Hampshire eXtended' parenthetic format.
virtual ITree * createReader(const std::string &format)
Get a new dynamically created ITree object.
General interface for tree writers.
General interface for tree readers.
static const std::string NEXUS_FORMAT
The so-called 'newick' parenthetic format.
static const std::string NHX_FORMAT
static const std::string NEWICK_FORMAT
virtual OTree * createWriter(const std::string &format)
Get a new dynamically created OTree object.