bpp-core3  3.0.0
IoParametrizable.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_IOPARAMETRIZABLE_H
6 #define BPP_IO_IOPARAMETRIZABLE_H
7 
8 #include <map>
9 
10 #include "../Numeric/ParameterAliasable.h"
11 #include "IoFormat.h"
12 #include "OutputStream.h"
13 
14 namespace bpp
15 {
20  public virtual IOFormat
21 {
22 public:
24  virtual ~IOParametrizable() {}
25 
26 public:
27  virtual const std::string getDataType() const { return "Parametrizable"; }
28 };
29 
34  public virtual IOParametrizable
35 {
36 public:
38  virtual ~OParametrizable() {}
39 
40 public:
51  virtual void write(const Parametrizable& parametrizable,
52  OutputStream& out,
53  std::vector<std::string>& writtenNames,
54  bool printComma = false) const = 0;
55 
69  virtual void write(const ParameterAliasable& parametrizable,
70  OutputStream& out,
71  std::map<std::string, std::string>& globalAliases,
72  const std::vector<std::string>& names,
73  std::vector<std::string>& writtenNames,
74  bool printLocalAliases = true,
75  bool printComma = false) const = 0;
76 };
77 } // end of namespace bpp.
78 #endif // BPP_IO_IOPARAMETRIZABLE_H
General interface writers.
General interface for parametrizable Output.
Extend the Parametrizable interface with support for parameter aliases.
This is the interface for all objects that imply parameters.
The IOFormat interface.
Definition: IoFormat.h:21
OutputStream interface.
Definition: OutputStream.h:29
virtual const std::string getDataType() const
Get the type of data this format deals with.