-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.h
65 lines (51 loc) · 1.5 KB
/
data.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @author German Irías <[email protected]>
* @version 2
* @since 2012-04-20
*/
#ifndef Data_h
#define Data_h
#include <vector>
#include "road.h"
#include "position.h"
using namespace std;
namespace tfg
{
class Data
{
public:
/**
* Interface to singleton
*
* Use Data::Interface()->MethodName() to call methods in this class.
* @return Pointer to Data singleton instance
*/
static Data* Instance();
/**
* Downloads and parses a road data xml file
*
* @param Url to road data xml file
* @return STL Vector of Road objects
*/
vector<Road> *ParseRoads(std::string url);
/**
* Downloads and parses a road and lane closure data xml file, adding that data to the Events container
*
* @param Url to closure data xml file
*/
void ParseClosures(std::string url);
/**
* Downloads and parses a road accident data xml file, adding that data to the Events container
*
* @param Url to accident data xml file
*/
void ParseAccidents(std::string url);
private:
Data() {}
Data(Data const&){}; // copy constructor is private
Data& operator=(Data const&){ return *this; }; // assignment operator is private
static Data* m_pInstance;
Position **positions;
};
}
#endif