MCPcopy Create free account
hub / github.com/comaps/comaps / RoutingOptions

Class RoutingOptions

libs/routing/routing_options.hpp:13–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace routing
12{
13class RoutingOptions
14{
15public:
16 enum Road : uint8_t
17 {
18 Usual = 1u << 0,
19 Toll = 1u << 1,
20 Motorway = 1u << 2,
21 Ferry = 1u << 3,
22 Dirty = 1u << 4,
23 Steps = 1u << 5,
24 Paved = 1u << 6,
25
26 Max = (1u << 6) + 1
27 };
28
29 using RoadType = std::underlying_type_t<Road>;
30
31 RoutingOptions() = default;
32 explicit RoutingOptions(RoadType mask) : m_options(mask) {}
33
34 static RoutingOptions LoadCarOptionsFromSettings();
35 static void SaveCarOptionsToSettings(RoutingOptions options);
36
37 void Add(Road type);
38 void Remove(Road type);
39 bool Has(Road type) const;
40
41 RoadType GetOptions() const { return m_options; }
42
43private:
44 RoadType m_options = 0;
45};
46
47class RoutingOptionsClassifier
48{

Callers 3

IndexGraphClass · 0.70
RoutingOptionSetterMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected