-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.h
59 lines (51 loc) · 981 Bytes
/
database.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
#ifndef DATABASE_H
#define DATABASE_H
#include <fstream>
#include <vector>
#include <stdlib.h>
#include "point.h"
namespace Processing
{
enum Directions{
D_N,
D_E,
D_S,
D_W,
D_NE,
D_NW,
D_SE,
D_SW
};
class DBNode{
public:
//DBNode(int, std::string , int* );
DBNode(int);
DBNode(const DBNode&);
int getNumber() const;
std::string getContent() const;
void setContent(std::string);
int getNextNodeNumber(Directions) const;
int getNextNodeNumber(int) const;
void setNextNodeNumber(int, int);
private:
int number;
std::string content;
int* nextNodesNumbers;
};
class DataBase
{
public:
DataBase();
DataBase(std::string);
~DataBase();
std::vector<Directions> generatePath(PList);
std::string findPath(std::vector<Directions>);
void addPath(std::vector<Directions>, std::string);
std::string getFilePath();
private:
void loadNodes();
std::string filePath;
std::vector<DBNode> nodes;
};
}
#endif // DATABASE_H