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:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-06-30 15:02:54 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-07-01 09:46:40 +0300
commitcd6792e04d95b30d9f4669f59f08aa99794d4b11 (patch)
treecce644dfec69dc7be9b336ed1a921a6ad874a665 /indexer/ftypes_matcher.cpp
parent517c506328c3e2c5504178cd59a65ddfc320b9cd (diff)
Added displaying of hotel info if any hotel is selected
Diffstat (limited to 'indexer/ftypes_matcher.cpp')
-rw-r--r--indexer/ftypes_matcher.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp
index 7b1328e18f..20d03af41e 100644
--- a/indexer/ftypes_matcher.cpp
+++ b/indexer/ftypes_matcher.cpp
@@ -425,6 +425,26 @@ IsBookingChecker const & IsBookingChecker::Instance()
return inst;
}
+IsHotelChecker::IsHotelChecker()
+{
+ Classificator const & c = classif();
+ for (auto const & tag : GetHotelTags())
+ m_types.push_back(c.GetTypeByPath({"tourism", tag}));
+}
+
+IsHotelChecker const & IsHotelChecker::Instance()
+{
+ static const IsHotelChecker inst;
+ return inst;
+}
+
+vector<string> const & IsHotelChecker::GetHotelTags()
+{
+ static vector<string> hotelTags = {"hotel", "apartment", "camp_site", "chalet",
+ "guest_house", "hostel", "motel", "resort"};
+ return hotelTags;
+}
+
uint32_t GetPopulation(FeatureType const & ft)
{
uint32_t population = ft.GetPopulation();