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:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2016-01-14 16:14:46 +0300
committerConstantin Shalnev <c.shalnev@corp.mail.ru>2016-01-14 16:14:46 +0300
commitffa964b5a8ac2dc8de4a1b4987834767f47122e6 (patch)
treea93ebdb38ac680be2f538481fda8032d8d118de6 /indexer/classificator.cpp
parent6840cdb9dbf741f00d4580dd7c3570068e532f17 (diff)
Added multiple versions of classificators and rule holders
Diffstat (limited to 'indexer/classificator.cpp')
-rw-r--r--indexer/classificator.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp
index 8f4ad4dc77..dffebd5610 100644
--- a/indexer/classificator.cpp
+++ b/indexer/classificator.cpp
@@ -1,5 +1,6 @@
#include "indexer/classificator.hpp"
#include "indexer/tree_structure.hpp"
+#include "indexer/map_style_reader.hpp"
#include "base/macros.hpp"
#include "base/logging.hpp"
@@ -119,10 +120,18 @@ void ClassifObject::ConcatChildNames(string & s) const
// Classificator implementation
/////////////////////////////////////////////////////////////////////////////////////////
+Classificator & classif(MapStyle mapStyle)
+{
+ int const index = static_cast<int>(mapStyle);
+ ASSERT_GREATER_OR_EQUAL(index, 0, ());
+ ASSERT_LESS(index, MapStyleCount, ());
+ static Classificator c[MapStyleCount];
+ return c[index];
+}
+
Classificator & classif()
{
- static Classificator c;
- return c;
+ return classif(GetStyleReader().GetCurrentStyle());
}
namespace ftype