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:
authorAlex Zolotarev <alex@maps.me>2016-03-04 11:06:24 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:51:28 +0300
commit4be5bc0fa919d2d5899e4df822c1012db1c77783 (patch)
tree8ff1689bfe7912b83a629deec419c3eb5aca37c5 /indexer/feature_meta.hpp
parent297cf71e4ad22b16d5a762cbb5b9171034869a4c (diff)
Metadata::TypeFromString to correctly match osm tags with our metadata types.
Diffstat (limited to 'indexer/feature_meta.hpp')
-rw-r--r--indexer/feature_meta.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indexer/feature_meta.hpp b/indexer/feature_meta.hpp
index c85b32f0ba..7fc272211a 100644
--- a/indexer/feature_meta.hpp
+++ b/indexer/feature_meta.hpp
@@ -97,6 +97,7 @@ class Metadata : public MetadataBase
public:
/// @note! Do not change values here.
/// Add new types to the end of list, before FMD_COUNT.
+ /// Please also modify MetadataTagProcessor::TypeFromString().
enum EType : int8_t
{
FMD_CUISINE = 1,
@@ -125,6 +126,9 @@ public:
FMD_COUNT
};
+ /// Used to normalize tags like "contact:phone" and "phone" to a common metadata enum value.
+ static bool TypeFromString(string const & osmTagKey, feature::Metadata::EType & outType);
+
void Set(EType type, string const & value)
{
MetadataBase::Set(type, value);