Loading [MathJax]/extensions/MathMenu.js
Antares Xpansion
Investment simulations for Antares studies
All Classes Namespaces Files Functions Variables Typedefs Pages
IterationResultLog.h
1#ifndef ANTARESXPANSION_ITERATIONRESULTLOG_H
2#define ANTARESXPANSION_ITERATIONRESULTLOG_H
3#include <list>
4#include <map>
5#include <string>
6
7#include "Commons.h"
8#include "antares-xpansion/xpansion_interfaces/ILogger.h"
9
10using xpansion::logger::commons::indent_0;
11using xpansion::logger::commons::indent_1;
12
13namespace xpansion
14{
15namespace logger
16{
17
18typedef std::map<std::string, std::string> value_map;
19typedef std::map<std::string, int> size_map;
20
22{
23public:
24 IterationResultLog() = default;
25 explicit IterationResultLog(const std::string& line_prefix);
26 std::string Log_at_iteration_end(const LogData& data);
27
28private:
29 const std::string LABEL = "LABEL";
30 const std::string VALUE = "VALUE";
31 const std::string UNIT = "UNIT";
32 std::list<value_map> _values;
33 size_map _max_sizes;
34 std::string _line_prefix = "";
35
36private:
37 std::string create_solution_str(const value_map& value, const size_map& sizes) const;
38
39 value_map create_value_map(const std::string& label,
40 const std::string& value,
41 const std::string& unit) const;
42
43 void setValuesFromData(const LogData& data);
44
45 void setMaximumStringSizes();
46
47 std::string getCompleteMessageString() const;
48};
49
50} // namespace logger
51} // namespace xpansion
52
53#endif // ANTARESXPANSION_ITERATIONRESULTLOG_H
Definition IterationResultLog.h:22
Definition ILogger.h:51