-
Notifications
You must be signed in to change notification settings - Fork 0
/
road.h
51 lines (37 loc) · 974 Bytes
/
road.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
#ifndef ROAD_H_
#define ROAD_H_
#include "JSON.h"
#include "roadItem.h"
class IPrintDriver;
class Container;
enum Heading{
North,
South,
East,
West
};
class Road{
private:
std::string name;
double length;
double xlocation;
double ylocation;
Heading heading;
public:
int NumOfRoads = 0;
void initRoad(string streetName, double locX, double locY, double len, Heading hdg);
Road();
Road(std::string streetName, double locX, double locY, double len, Heading hdg);
double GetLength();
double GetXLocation();
double GetYLocation();
Heading GetHeading();
std::string GetRoadName();
void AddRoadItem(RoadItem *roadItem);
// void InsertNewRoadItemBefore(RoadItem *currentRoadItem, RoadItem *previousItem);
// void InsertNewRoadItemAfter(RoadItem *currentRoadItem, RoadItem *nextItem);
void Print(IPrintDriver* print, Container *o);
void Save(JSONSave* sv, ostream& str);
void Load(JSONLoad* ld, istream& str);
};
#endif