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:
authorSergey Magidovich <mgsergio@mapswithme.com>2016-09-21 13:16:00 +0300
committerSergey Magidovich <mgsergio@mapswithme.com>2016-09-21 16:29:59 +0300
commitabfcfec733bfe1ef7f53d8e2a6ab253cd0c4d817 (patch)
treec5d99ce582c8fbcf98987e4b224afe902d23fd2b /indexer
parente646b270bd68d0c27adac5ed712682cf1500b68c (diff)
Add restaurants_info utility.
Diffstat (limited to 'indexer')
-rw-r--r--indexer/ftypes_matcher.cpp20
-rw-r--r--indexer/ftypes_matcher.hpp7
2 files changed, 27 insertions, 0 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp
index 67a1291059..dfe0a32004 100644
--- a/indexer/ftypes_matcher.cpp
+++ b/indexer/ftypes_matcher.cpp
@@ -456,6 +456,26 @@ IsWifiChecker const & IsWifiChecker::Instance()
return instance;
}
+IsFoodChecker:: IsFoodChecker()
+{
+ Classificator const & c = classif();
+ char const * const paths[][2] = {
+ {"amenity", "cafe"},
+ {"amenity", "bar"},
+ {"amenity", "pub"},
+ {"amenity", "fast_food"},
+ {"amenity", "restaurant"}
+ };
+ for (auto const & path : paths)
+ m_types.push_back(c.GetTypeByPath({path[0], path[1]}));
+}
+
+IsFoodChecker const & IsFoodChecker::Instance()
+{
+ static const IsFoodChecker instance;
+ return instance;
+}
+
uint32_t GetPopulation(FeatureType const & ft)
{
uint32_t population = ft.GetPopulation();
diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp
index 5effd53211..2e8fd6bc3e 100644
--- a/indexer/ftypes_matcher.hpp
+++ b/indexer/ftypes_matcher.hpp
@@ -183,6 +183,13 @@ public:
static IsWifiChecker const & Instance();
};
+class IsFoodChecker : public BaseChecker
+{
+ IsFoodChecker();
+public:
+ static IsFoodChecker const & Instance();
+};
+
/// Type of locality (do not change values and order - they have detalization order)
/// COUNTRY < STATE < CITY < ...
enum Type { NONE = -1, COUNTRY = 0, STATE, CITY, TOWN, VILLAGE, LOCALITY_COUNT };