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:
authorDarafei Praliaskouski <komzpa@gmail.com>2013-02-18 16:01:02 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:51:08 +0300
commitd454c374834a7091540dee308dc4294f85cf4f7e (patch)
tree3fa2822109648734e032545975441a4fdff7be67 /indexer
parent36cb56960ae2860f858e7082bb9963979e4be909 (diff)
Removed visibility.txt
Diffstat (limited to 'indexer')
-rw-r--r--indexer/classificator.cpp19
-rw-r--r--indexer/classificator.hpp4
-rw-r--r--indexer/classificator_loader.cpp18
-rw-r--r--indexer/drawing_rules.cpp2
4 files changed, 4 insertions, 39 deletions
diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp
index 19fa0cd5ec..ab8fbf27d9 100644
--- a/indexer/classificator.cpp
+++ b/indexer/classificator.cpp
@@ -436,25 +436,6 @@ void Classificator::PrintClassificator(char const * fPath)
#endif
}
-void Classificator::ReadVisibility(istream & s)
-{
- ClassifObject::VisLoadPolicy policy(&m_root);
- tree::LoadTreeAsText(s, policy);
-}
-
-void Classificator::PrintVisibility(char const * fPath)
-{
-#ifndef OMIM_OS_BADA
- ofstream file(fPath);
-
- ClassifObject::VisSavePolicy policy(&m_root);
- tree::SaveTreeAsText(file, policy);
-
-#else
- ASSERT ( false, ("PrintVisibility uses only in indexer_tool") );
-#endif
-}
-
void Classificator::SortClassificator()
{
GetMutableRoot()->Sort();
diff --git a/indexer/classificator.hpp b/indexer/classificator.hpp
index 117aa9f37b..43a4affdba 100644
--- a/indexer/classificator.hpp
+++ b/indexer/classificator.hpp
@@ -115,6 +115,7 @@ public:
typedef bitset<18> visible_mask_t;
visible_mask_t GetVisibilityMask() const { return m_visibility; }
void SetVisibilityMask(visible_mask_t mask) { m_visibility = mask; }
+ void SetVisibilityOnScale(const bool isVisible, const int scale) { m_visibility[scale] = isVisible; }
/// @name Policies for classificator tree serialization.
//@{
@@ -213,9 +214,6 @@ public:
void ReadClassificator(istream & s);
void PrintClassificator(char const * fPath);
- void ReadVisibility(istream & s);
- void PrintVisibility(char const * fPath);
-
void ReadTypesMapping(istream & s);
void SortClassificator();
diff --git a/indexer/classificator_loader.cpp b/indexer/classificator_loader.cpp
index 34cc1fdc75..5b16ac1caf 100644
--- a/indexer/classificator_loader.cpp
+++ b/indexer/classificator_loader.cpp
@@ -17,7 +17,6 @@
namespace classificator
{
void ReadCommon(Reader * classificator,
- Reader * visibility,
Reader * types)
{
Classificator & c = classif();
@@ -32,14 +31,6 @@ namespace classificator
}
{
- //LOG(LINFO, ("Reading visibility"));
- ReaderStreamBuf buffer(visibility);
-
- istream s(&buffer);
- c.ReadVisibility(s);
- }
-
- {
//LOG(LINFO, ("Reading types mapping"));
ReaderStreamBuf buffer(types);
@@ -48,20 +39,13 @@ namespace classificator
}
}
- void ReadVisibility(string const & fPath)
- {
- ifstream s(fPath.c_str());
- classif().ReadVisibility(s);
- }
-
void Load()
{
LOG(LDEBUG, ("Reading of classificator started"));
Platform & p = GetPlatform();
- ReadCommon(p.GetReader("classificator.txt"),
- p.GetReader("visibility.txt"),
+ ReadCommon(p.GetReader("classificator.txt"),
p.GetReader("types.txt"));
//LOG(LINFO, ("Reading of drawing rules"));
diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp
index b381f5ca12..101bd9c912 100644
--- a/indexer/drawing_rules.cpp
+++ b/indexer/drawing_rules.cpp
@@ -322,6 +322,8 @@ namespace
{
size_t const i = m_holder.AddRule(scale, type, new TRule(rule));
Key k(scale, type, i);
+
+ p->SetVisibilityOnScale(true, scale);
k.SetPriority(rule.priority());
p->AddDrawRule(k);
}