-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtourcmd.h
102 lines (84 loc) · 1.74 KB
/
tourcmd.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef TOURCMD_H
#define TOURCMD_H
#include <iostream>
#include <string>
#include "geopoint.h"
class TourCommand
{
public:
enum TOUR_COMMAND
{
invalid,
turn,
proceed,
commentary
};
TourCommand()
{
command_ = invalid;
}
void init_turn(const std::string& turn_direction, const std::string& street_name)
{
command_ = turn;
street_name_ = street_name;
direction_ = turn_direction;
distance_ = 0;
}
void init_proceed(const std::string& direction, const std::string& streetName,
double distance, const GeoPoint& start, const GeoPoint& end)
{
command_ = proceed;
direction_ = direction;
street_name_ = streetName;
distance_ = distance;
start_ = start;
end_ = end;
}
void init_commentary(const std::string& poi, const std::string& commentary)
{
command_ = TOUR_COMMAND::commentary;
poi_ = poi;
commentary_ = commentary;
}
TOUR_COMMAND get_command_type() const
{
return command_;
}
std::string get_direction() const
{
return direction_;
}
std::string get_street() const
{
return street_name_;
}
double get_distance() const
{
return distance_;
}
void set_distance(double dist)
{
distance_ = dist;
}
std::string get_commentary() const
{
return commentary_;
}
std::string get_poi() const {
return poi_;
}
void get_points(GeoPoint& start, GeoPoint& end) const
{
start = start_;
end = end_;
}
private:
TOUR_COMMAND command_; // turn left, turn right, proceed
std::string street_name_; // Westwood Blvd
std::string direction_; // "left" for turn or "northeast" for proceed
std::string commentary_; // "this is the bruin bear, which was added in ..."
std::string poi_; // "Bruin Bear"
double distance_; // 3.2 //KM
GeoPoint start_, end_;
};
#endif // TOURCMD_H