diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2017-02-03 16:47:42 +0300 |
---|---|---|
committer | VladiMihaylenko <vxmihaylenko@gmail.com> | 2017-02-03 16:47:42 +0300 |
commit | 25303ae49278ad2c7c82381d0a7e8d4a1c3af9fb (patch) | |
tree | b714e18cfe21e7aedbe0c286112f618c8fd1e962 /indexer | |
parent | 7f6fb8e3c38bf2d61501862b68664bebe691e495 (diff) |
Added shields to French roads.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/ftypes_matcher.cpp | 15 | ||||
-rw-r--r-- | indexer/ftypes_matcher.hpp | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp index a893befac4..67f316872f 100644 --- a/indexer/ftypes_matcher.cpp +++ b/indexer/ftypes_matcher.cpp @@ -712,12 +712,23 @@ public: strings::UniString s = strings::MakeUniString(rawText); if (s[0] == 'E' || s[0] == strings::UniChar(1045)) // Latin and cyrillic. - return RoadShield(RoadShieldType::Russia_Motorway, rawText); + return RoadShield(RoadShieldType::Euro_Motorway, rawText); return RoadShield(RoadShieldType::Russia_Highway, rawText); } }; +class FranceRoadShieldParser : public SimpleRoadShieldParser +{ +public: + FranceRoadShieldParser(std::string const & baseRoadNumber) + : SimpleRoadShieldParser(baseRoadNumber, {{'A', RoadShieldType::France_Motorway}, + {'N', RoadShieldType::France_Motorway}, + {'E', RoadShieldType::Euro_Motorway}, + {'D', RoadShieldType::France_Departmental}}) + {} +}; + std::vector<RoadShield> GetRoadShields(FeatureType const & f) { std::string const roadNumber = f.GetRoadNumber(); @@ -737,6 +748,8 @@ std::vector<RoadShield> GetRoadShields(FeatureType const & f) return UKRoadShieldParser(roadNumber).GetRoadShields(); if (mwmName == "Russia") return RussiaRoadShieldParser(roadNumber).GetRoadShields(); + if (mwmName == "France") + return FranceRoadShieldParser(roadNumber).GetRoadShields(); return std::vector<RoadShield>{RoadShield(RoadShieldType::Default, roadNumber)}; } diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index f0b02030af..c599aaa35d 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -255,10 +255,12 @@ enum class RoadShieldType Default = 0, US_Interstate, US_Highway, + Euro_Motorway, UK_Motorway, UK_Highway, - Russia_Motorway, Russia_Highway, + France_Motorway, + France_Departmental, Count }; |