-
Notifications
You must be signed in to change notification settings - Fork 1
/
route.h
55 lines (39 loc) · 1.04 KB
/
route.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
//
// Created by Aykut Ismailov on 29.4.2020 г..
//
#ifndef HDMAP_ROUTE_H
#define HDMAP_ROUTE_H
#include "object.h"
#include "route_type.h"
class route
{
object start;
object end;
route_type road_type;
double duration;
public:
route():start(0,0,object_type::Invalid),end(0,0,object_type::Invalid),road_type(route_type::Invalid),duration(0){}
route(int start_x,
int start_y,
object_type start_ot,
int end_x,
int end_y,
object_type end_ot,
route_type road_type,
double duration) :
start(start_x, start_y, start_ot),
end(end_x, end_y, end_ot),
road_type(road_type),
duration(duration)
{
}
object getStart() const;
object getEnd() const;
route_type getRoadType() const;
double getDuration() const;
std::string getDurationString() const;
double getDistance() const;
~route() = default;
friend std::ostream& operator<<(std::ostream&, route);
};
#endif //HDMAP_ROUTE_H