blob: 73deddd06641bc54b7d31a16f89f0a60c599eca6 (
plain)
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
|
#pragma once
#include "routing_common/vehicle_model.hpp"
namespace routing
{
class BicycleModel : public VehicleModel
{
public:
BicycleModel();
BicycleModel(VehicleModel::InitListT const & speedLimits);
/// VehicleModel overrides:
bool IsOneWay(FeatureType const & f) const override;
static BicycleModel const & AllLimitsInstance();
protected:
RoadAvailability GetRoadAvailability(feature::TypesHolder const & types) const override;
private:
void Init();
/// @return true if it is allowed to ride a bicycle in both directions.
bool IsBicycleBidir(feature::TypesHolder const & types) const;
uint32_t m_noBicycleType = 0;
uint32_t m_yesBicycleType = 0;
uint32_t m_bidirBicycleType = 0;
};
class BicycleModelFactory : public VehicleModelFactory
{
public:
// TODO: remove countryParentNameGetterFn default value after removing unused bicycle routing
// from road_graph_router
BicycleModelFactory(CountryParentNameGetterFn const & countryParentNameGetterFn = {});
};
} // namespace routing
|