bpp-phyl3  3.0.0
IoSubstitutionModelFactory.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
6 
7 using namespace bpp;
8 
9 const std::string IOSubstitutionModelFactory::BPPO_FORMAT = "Bpp0";
10 
12 {
13  if (format == BPPO_FORMAT)
14  return new BppOSubstitutionModelFormat(BppOSubstitutionModelFormat::ALL, true, true, true, true, 0);
15  else
16  throw Exception("Format " + format + " is not supported for input.");
17 }
18 
20 {
21  if (format == BPPO_FORMAT)
22  return new BppOSubstitutionModelFormat(BppOSubstitutionModelFormat::ALL, true, true, true, true, 0);
23  else
24  throw Exception("Format " + format + " is not supported for output.");
25 }
Substitution model I/O in BppO format.
virtual OSubstitutionModel * createWriter(const std::string &format)
Get a new dynamically created OSubstitutionModel object.
virtual ISubstitutionModel * createReader(const std::string &format)
Get a new dynamically created ISubstitutionModel object.
General interface for model readers.
General interface for distance matrix writers.
Defines the basic types of data flow nodes.