XMLLogger class implements interface for system state logging to XML-file. More...
#include <XMLLogger.h>
Public Member Functions | |
XMLLogger * | Clone () const override |
Method for cloning objects. Implementations of this method creates copy of object in memmory and return pointer to copy. More... | |
bool | GenerateLog () override |
Method for creating final log in XML-file. More... | |
void | SetResults (const std::unordered_map< int, std::vector< Point >> &stepsLog, const std::unordered_map< int, std::vector< Point >> &goalsLog, const std::unordered_map< int, std::pair< bool, int >> &resultsLog) override |
Sets full information about execution, including states on each step, curren goals on each step, success of each agent. More... | |
void | SetSummary (const Summary &res) override |
Sets brief information about execution results. More... | |
XMLLogger () | |
XMLLogger default constructor. More... | |
XMLLogger (std::string fileName, std::string inpFileName) | |
XMLLogger constructor. More... | |
XMLLogger (const XMLLogger &obj) | |
XMLLogger copy constructor. More... | |
~XMLLogger () override | |
XMLLogger destructor. More... | |
![]() | |
virtual | ~Logger () |
Logger virtual destructor. More... | |
Static Public Member Functions | |
static std::string | GenerateLogFileName (std::string inpFileName, int agentsNum) |
Creates a string of form "inpFileName_agentsNum_log.xml". More... | |
XMLLogger class implements interface for system state logging to XML-file.
Log contains the full information about the execution of task. It includes same tags as input file, summary and information about each step of each agent. Summary contains the main information about the execution of tasks. Summary includes following tags:
Summary example:
Agent's path example:
Definition at line 56 of file XMLLogger.h.
XMLLogger::XMLLogger | ( | ) |
XMLLogger default constructor.
Definition at line 143 of file XMLLogger.cpp.
XMLLogger::XMLLogger | ( | std::string | fileName, |
std::string | inpFileName | ||
) |
XMLLogger constructor.
fileName | Path to output log file. |
inpFileName | Path to input file to copy to output. |
Definition at line 9 of file XMLLogger.cpp.
XMLLogger::XMLLogger | ( | const XMLLogger & | obj | ) |
XMLLogger copy constructor.
obj | Object to copy. |
Definition at line 21 of file XMLLogger.cpp.
|
override |
XMLLogger destructor.
Definition at line 31 of file XMLLogger.cpp.
|
overridevirtual |
Method for cloning objects. Implementations of this method creates copy of object in memmory and return pointer to copy.
Implements Logger.
Definition at line 152 of file XMLLogger.cpp.
|
overridevirtual |
Method for creating final log in XML-file.
Implements Logger.
Definition at line 39 of file XMLLogger.cpp.
|
static |
Creates a string of form "inpFileName_agentsNum_log.xml".
inpFileName | Path to input XML-file to insert into result string. |
agentsNum | Number of agents to insert into result string. |
Definition at line 106 of file XMLLogger.cpp.
|
overridevirtual |
Sets full information about execution, including states on each step, curren goals on each step, success of each agent.
stepsLog | Agent states on each step. |
goalsLog | Agent curren goals on each step. |
resultsLog | Success of each agent and number of steps of each agent. |
Implements Logger.
Definition at line 66 of file XMLLogger.cpp.
|
overridevirtual |
Sets brief information about execution results.
res | Execution results in brief form. |
Implements Logger.
Definition at line 50 of file XMLLogger.cpp.