XMLReader.h
Go to the documentation of this file.
1 
7 #include <string>
8 #include <sstream>
9 
10 #include "../tinyxml/tinyxml2.h"
11 #include "Reader.h"
12 #include "Const.h"
13 #include "Agent.h"
14 #import "ORCAAgent.h"
15 #include "ThetaStar.h"
16 #include "DirectPlanner.h"
17 
18 
19 
20 #ifndef ORCA_XMLREADER_H
21 #define ORCA_XMLREADER_H
22 
23 
24 
25 using namespace tinyxml2;
26 
73 class XMLReader : public Reader
74 {
75  public:
76 
80  XMLReader();
81 
86  XMLReader(const std::string &fileName);
87 
92  XMLReader(const XMLReader &obj);
93 
97  ~XMLReader() override;
98 
103  bool ReadData() override;
104 
110  bool GetMap(Map **map) override;
111 
117  bool GetEnvironmentOptions(EnvironmentOptions **envOpt) override;
118 
125  bool GetAgents(std::vector<Agent *> &agents, const int &numThreshold) override;
126 
132  XMLReader* Clone() const override;
133 
139  XMLReader & operator = (const XMLReader & obj);
140 
141 
142 
143  private:
144 
146  std::string fileName;
147 
148  XMLDocument *doc;
149  XMLElement *root;
150 
151  std::vector<Agent *> *allAgents;
152  Map *map;
153  EnvironmentOptions *options;
154  std::vector<std::vector<int>> *grid;
155  std::vector<std::vector<Point>> *obstacles;
156  int plannertype;
157 
158  bool ReadMap();
159  bool ReadAgents();
160  bool ReadAlgorithmOptions();
162 };
163 
164 
165 #endif //ORCA_XMLREADER_H
Reader class implements base interface for input data reading.
Definition: Reader.h:21
File contains Reader class.
File contains ThetaStar class.
The XMLReader class implements interface for input data reading from XML-file with a specific structu...
Definition: XMLReader.h:73
Class EnvironmentOptions contains environment and algoritms parameters.
Map class describes static environment.
Definition: Map.h:36
File contains ORCAAgent class.
File contains main constants.
File contains Agent class and AgentParam class.
File contains DirectPlanner class.


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