Welcome to mirror list, hosted at ThFree Co, Russian Federation.

road_info_getter.hpp « openlr - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 83a648d0409aede74b34c92fa7e9e725c692685b (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
41
42
43
44
45
46
47
48
49
50
51
#pragma once

#include "openlr/openlr_model.hpp"
#include "openlr/road_type_checkers.hpp"

#include "indexer/feature_data.hpp"

#include "std/map.hpp"

class Classificator;
class Index;

namespace feature
{
class TypesHolder;
}

namespace openlr
{
class RoadInfoGetter final
{
public:
  struct RoadInfo
  {
    RoadInfo() = default;

    FunctionalRoadClass m_frc = FunctionalRoadClass::NotAValue;
    FormOfWay m_fow = FormOfWay::NotAValue;
  };

  RoadInfoGetter(Index const & index);

  RoadInfo Get(FeatureID const & fid);

 private:
  FunctionalRoadClass GetFunctionalRoadClass(feature::TypesHolder const & types) const;
  FormOfWay GetFormOfWay(feature::TypesHolder const & types) const;

  Index const & m_index;
  Classificator const & m_c;

  TrunkChecker const m_trunkChecker;
  PrimaryChecker const m_primaryChecker;
  SecondaryChecker const m_secondaryChecker;
  TertiaryChecker const m_tertiaryChecker;
  ResidentialChecker const m_residentialChecker;
  LivingStreetChecker const m_livingStreetChecker;

  map<FeatureID, RoadInfo> m_cache;
};
}  // namespace openlr