bpp-phyl3  3.0.0
IoFrequencySet.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_PHYL_IO_IOFREQUENCYSET_H
6 #define BPP_PHYL_IO_IOFREQUENCYSET_H
7 
8 
9 #include "../Model/FrequencySet/FrequencySet.h"
10 
11 // From bpp-core:
12 #include <Bpp/Exceptions.h>
13 #include <Bpp/Io/IoFormat.h>
14 #include <Bpp/Io/OutputStream.h>
15 
16 // From bpp-seq:
18 
19 namespace bpp
20 {
25  public virtual IOFormat
26 {
27 public:
29  virtual ~IoFrequencySet() {}
30 
31 public:
32  virtual const std::string getDataType() const { return "Frequencies Set"; }
33 };
34 
39  public virtual IoFrequencySet
40 {
41 public:
43  virtual ~IFrequencySet() {}
44 
45 public:
57  virtual std::unique_ptr<FrequencySetInterface> readFrequencySet(
58  std::shared_ptr<const Alphabet> alphabet,
59  const std::string& freqDescription,
60  const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
61  size_t nData,
62  bool parseArguments = true) = 0;
63 
67  virtual const std::map<std::string, std::string>& getUnparsedArguments() const = 0;
68 };
69 
74  public virtual IoFrequencySet
75 {
76 public:
78  virtual ~OFrequencySet() {}
79 
80 public:
91  virtual void writeFrequencySet(
92  const FrequencySetInterface& pfreqset,
93  OutputStream& out,
94  std::map<std::string, std::string>& globalAliases,
95  std::vector<std::string>& writtenNames) const = 0;
96 };
97 } // end of namespace bpp.
98 #endif // BPP_PHYL_IO_IOFREQUENCYSET_H
Parametrize a set of state frequencies.
Definition: FrequencySet.h:29
General interface for distance matrix readers.
virtual std::unique_ptr< FrequencySetInterface > readFrequencySet(std::shared_ptr< const Alphabet > alphabet, const std::string &freqDescription, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface >> &mData, size_t nData, bool parseArguments=true)=0
Read a frequencies set from a string.
virtual const std::map< std::string, std::string > & getUnparsedArguments() const =0
virtual ~IFrequencySet()
General interface for model I/O.
virtual const std::string getDataType() const
virtual ~IoFrequencySet()
General interface for distance matrix writers.
virtual void writeFrequencySet(const FrequencySetInterface &pfreqset, OutputStream &out, std::map< std::string, std::string > &globalAliases, std::vector< std::string > &writtenNames) const =0
Write a substitution model to a stream.
virtual ~OFrequencySet()
Defines the basic types of data flow nodes.