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

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2017-02-03 16:47:42 +0300
committerVladiMihaylenko <vxmihaylenko@gmail.com>2017-02-03 16:47:42 +0300
commit25303ae49278ad2c7c82381d0a7e8d4a1c3af9fb (patch)
treeb714e18cfe21e7aedbe0c286112f618c8fd1e962 /indexer/ftypes_matcher.cpp
parent7f6fb8e3c38bf2d61501862b68664bebe691e495 (diff)
Added shields to French roads.
Diffstat (limited to 'indexer/ftypes_matcher.cpp')
-rw-r--r--indexer/ftypes_matcher.cpp15
1 files changed, 14 insertions, 1 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)};
}