resultsTable.hh

Go to the documentation of this file.
1 
6 #ifndef resultsTable_hh
7 #define resultsTable_hh
8 
9 #include <map>
10 #include <string>
11 #include "basics/outputOperator.hh"
12 #include "inputOutput.hh"
13 
14 namespace concepts {
15 
16  // ********************************************************** ResultsTable **
17 
23  class ResultsTable : public virtual OutputOperator {
24  public:
29  template<enum tableTypes t>
30  struct tableDelimTraits {};
31 
33  enum mapTypes { DOUBLE, STRING, INT, BOOL };
34 
38 
40  void addMap(enum mapTypes type, const char* name,
41  const InOutParameters& holder);
42 
43  template<enum tableTypes t>
44  void print(std::ostream& os) const;
45 
46  template<enum tableTypes t>
47  void print(std::ostream& os, enum mapTypes typeL, const char* nameL) const;
48  protected:
49  virtual std::ostream& info(std::ostream& os) const;
50  private:
51  std::map<const char*, const std::map<int, double>*, ltstr> doubleMaps_;
52  std::map<const char*,
53  const std::map<int, std::string>*, ltstr> stringMaps_;
54  std::map<const char*, const std::map<int, int>*, ltstr> intMaps_;
55  std::map<const char*, const std::map<int, bool>*, ltstr> boolMaps_;
56  bool leader_;
57  enum mapTypes typeL_;
58  char* nameL_;
59  template<enum tableTypes t>
60  void headline_(std::ostream& os) const;
61  template<enum tableTypes t>
62  void tableline_(std::ostream& os, const int idx) const;
63  };
64 
65 } // namespace concepts
66 
67 #endif // resultsTable_hh
std::map< const char *, const std::map< int, bool > *, ltstr > boolMaps_
Definition: resultsTable.hh:55
std::map< const char *, const std::map< int, std::string > *, ltstr > stringMaps_
Definition: resultsTable.hh:53
std::map< const char *, const std::map< int, double > *, ltstr > doubleMaps_
Definition: resultsTable.hh:51
Holds parameters in hashes.
Definition: inputOutput.hh:75
enum mapTypes typeL_
Definition: resultsTable.hh:57
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
ResultsTable()
Constructor.
void print(std::ostream &os, enum mapTypes typeL, const char *nameL) const
void addMap(enum mapTypes type, const char *name, const InOutParameters &holder)
mapTypes
Types of maps in InOutParameters.
Definition: resultsTable.hh:33
void headline_(std::ostream &os) const
Organizes the results in the hashes from InOutParameters in a nice table.
Definition: resultsTable.hh:23
std::map< const char *, const std::map< int, int > *, ltstr > intMaps_
Definition: resultsTable.hh:54
void print(std::ostream &os) const
Class providing an output operator.
void tableline_(std::ostream &os, const int idx) const
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich