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
7using namespace bpp;
8
9const std::string IOSubstitutionModelFactory::BPPO_FORMAT = "Bpp0";
10
11std::unique_ptr<ISubstitutionModel> IOSubstitutionModelFactory::createReader(const std::string& format)
12{
13 if (format == BPPO_FORMAT)
14 return std::make_unique<BppOSubstitutionModelFormat>(BppOSubstitutionModelFormat::ALL, true, true, true, true, 0);
15 else
16 throw Exception("Format " + format + " is not supported for input.");
17}
18
19std::unique_ptr<OSubstitutionModel> IOSubstitutionModelFactory::createWriter(const std::string& format)
20{
21 if (format == BPPO_FORMAT)
22 return std::make_unique<BppOSubstitutionModelFormat>(BppOSubstitutionModelFormat::ALL, true, true, true, true, 0);
23 else
24 throw Exception("Format " + format + " is not supported for output.");
25}
virtual std::unique_ptr< OSubstitutionModel > createWriter(const std::string &format)
Get a new dynamically created OSubstitutionModel object.
Defines the basic types of data flow nodes.