bpp-core3  3.0.0
BppODiscreteDistributionFormat.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_IO_BPPODISCRETEDISTRIBUTIONFORMAT_H
6 #define BPP_IO_BPPODISCRETEDISTRIBUTIONFORMAT_H
7 
8 
10 
11 namespace bpp
12 {
22  public virtual IDiscreteDistribution,
23  public virtual ODiscreteDistribution
24 {
25 protected:
26  bool verbose_;
27  std::map<std::string, std::string> unparsedArguments_;
28 
29 public:
30  BppODiscreteDistributionFormat(bool verbose = true) : verbose_(verbose), unparsedArguments_() {}
32 
33 public:
34  const std::string getFormatName() const { return "BppO"; }
35 
36  const std::string getFormatDescription() const { return "Bpp Options format."; }
37 
38  std::unique_ptr<DiscreteDistributionInterface> readDiscreteDistribution(const std::string& distDescription, bool parseArguments = true);
39 
40  const std::map<std::string, std::string>& getUnparsedArguments() const { return unparsedArguments_; }
41 
44  OutputStream& out,
45  std::map<std::string, std::string>& globalAliases,
46  std::vector<std::string>& writtenNames) const;
47 
48 protected:
58 };
59 } // end of namespace bpp.
60 #endif // BPP_IO_BPPODISCRETEDISTRIBUTIONFORMAT_H
General interface for distance matrix readers.
General interface writers.
std::unique_ptr< DiscreteDistributionInterface > readDiscreteDistribution(const std::string &distDescription, bool parseArguments=true)
Read a discrete distribution from a string.
Interface for discrete distribution objects.
std::map< std::string, std::string > unparsedArguments_
void writeDiscreteDistribution(const DiscreteDistributionInterface &dist, OutputStream &out, std::map< std::string, std::string > &globalAliases, std::vector< std::string > &writtenNames) const
Write a discrete distribution to a stream.
const std::map< std::string, std::string > & getUnparsedArguments() const
void initialize_(DiscreteDistributionInterface &rDist)
Set parameter initial values of a given distribution according to options.
OutputStream interface.
Definition: OutputStream.h:29
const std::string getFormatDescription() const
Get a description of the file format.
Discrete Distribution I/O in BppO format.
const std::string getFormatName() const
Get the name of the file format.