-
Notifications
You must be signed in to change notification settings - Fork 1
/
domain.h
47 lines (40 loc) · 808 Bytes
/
domain.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
#pragma once
#include <array>
#include <deque>
#include <set>
#include <string>
#include <unordered_map>
struct Stop {
std::string name;
double latitude{};
double longitude{};
std::deque<std::pair<int, std::string>> distances_to_stops;
};
struct Bus {
std::string name;
std::deque<std::string> stops;
bool is_roundtrip = false;
};
enum class RequestType {
BUS,
STOP,
MAP,
ROUTE
};
struct Stat {
int id{};
RequestType type;
std::unordered_map<std::string, std::string> key_values;
};
struct Bus_Route_Stat {
std::string bus_name;
int stops_count{};
int unique_stops{};
double length{};
double curvature{};
};
struct BusesToStop {
std::string stop_name;
bool notFound = true;
std::set<std::string_view> buses;
};