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:
authorvng <viktor.govako@gmail.com>2011-08-15 18:13:19 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:21:38 +0300
commite367587b92521e47ef80e11f0c1488507b5ac4c4 (patch)
tree1717d1f807a8db485afa7e9c14e5870148b0e627 /indexer/classificator.hpp
parent4e8e88052775f4781f8a96e7688b7602db5d4e61 (diff)
Add additional types mapping (index <-> type) in classificator.
Diffstat (limited to 'indexer/classificator.hpp')
-rw-r--r--indexer/classificator.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indexer/classificator.hpp b/indexer/classificator.hpp
index cabec15a86..006005a97a 100644
--- a/indexer/classificator.hpp
+++ b/indexer/classificator.hpp
@@ -1,5 +1,6 @@
#pragma once
#include "drawing_rule_def.hpp"
+#include "types_mapping.hpp"
#include "../base/base.hpp"
@@ -195,6 +196,9 @@ class Classificator
{
ClassifObject m_root;
+ Index2Type m_i2t;
+ Type2Index m_t2i;
+
static ClassifObject * AddV(ClassifObject * parent, string const & key, string const & value);
public:
@@ -210,6 +214,8 @@ public:
void ReadVisibility(string const & buffer);
void PrintVisibility(char const * fPath);
+ void ReadTypesMapping(string const & buffer);
+
void SortClassificator();
//@}
@@ -217,6 +223,9 @@ public:
/// path = ["natural", "caostline"].
uint32_t GetTypeByPath(vector<string> const & path);
+ uint32_t TypeForIndex(uint32_t t) const { return m_t2i.GetIndex(t); }
+ uint32_t IndexForType(uint32_t i) const { return m_i2t.GetType(i); }
+
// Iterate for possible objects types
//template <class ToDo> void ForEachType(ToDo toDo)
//{