XMLLogger.h
Go to the documentation of this file.
1 
7 #ifndef ORCA_XMLLOGGER_H
8 #define ORCA_XMLLOGGER_H
9 
10 #include <string>
11 #include <vector>
12 #include <sstream>
13 #include <unordered_map>
14 
15 #include "../tinyxml/tinyxml2.h"
16 #include "Logger.h"
17 
18 using namespace std;
19 using namespace tinyxml2;
20 
21 
56 class XMLLogger : public Logger
57 {
58  public:
62  XMLLogger();
63 
69  XMLLogger(std::string fileName, std::string inpFileName);
70 
75  XMLLogger(const XMLLogger &obj);
76 
80  ~XMLLogger() override;
81 
86  bool GenerateLog() override;
87 
92  void SetSummary(const Summary &res) override;
93 
101  void
102  SetResults(const std::unordered_map<int, std::vector<Point>> &stepsLog, const std::unordered_map<int, std::vector<Point>> &goalsLog,
103  const std::unordered_map<int, std::pair<bool, int>> &resultsLog) override;
104 
110  XMLLogger* Clone() const override;
111 
118  static std::string GenerateLogFileName(std::string inpFileName, int agentsNum);
119 
120  private:
122  bool CloneInputFile();
123 
124  std::string fileName;
125  std::string inpFileName;
126  XMLDocument *doc;
127  XMLElement *root;
128  XMLElement *log;
130 };
131 
132 
133 #endif //ORCA_XMLLOGGER_H
Logger class implements base interface for system state logging.
Definition: Logger.h:22
XMLLogger class implements interface for system state logging to XML-file.
Definition: XMLLogger.h:56
Class Summary contains brief information about execution results.
Definition: Summary.h:32
File contains Logger class.


ORCAStar
Author(s): Stepan Drgachev
autogenerated on Wed Jul 15 2020 16:13:14