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-01-05 03:33:57 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:09:17 +0300
commit29fad748ac0872c398802e3d9e4ae467f2093713 (patch)
tree9da666da3511503d44bb1e1b200bd4db540a68c6 /indexer/features_vector.hpp
parente44cfb91ab0fdc510912b18880dd9d04533594b5 (diff)
Better geometry sorting.
Divide geometry in separate files in files-container.
Diffstat (limited to 'indexer/features_vector.hpp')
-rw-r--r--indexer/features_vector.hpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/indexer/features_vector.hpp b/indexer/features_vector.hpp
index d1612b5fa6..a4bfe3ba1e 100644
--- a/indexer/features_vector.hpp
+++ b/indexer/features_vector.hpp
@@ -11,30 +11,24 @@
//#include "../std/bind.hpp"
-template <class ReaderT>
struct FeatureReaders
{
- ReaderT m_datR, m_geomR, m_trgR;
+ FilesContainerR m_cont;
+ FileReader m_datR;
- template <class ContainerT>
- FeatureReaders(ContainerT const & cont)
- : m_datR(cont.GetReader(DATA_FILE_TAG)),
- m_geomR(cont.GetReader(GEOMETRY_FILE_TAG)),
- m_trgR(cont.GetReader(TRIANGLE_FILE_TAG))
+ FeatureReaders(FilesContainerR const & cont)
+ : m_cont(cont), m_datR(cont.GetReader(DATA_FILE_TAG))
{
uint64_t const offset = feature::GetSkipHeaderSize(m_datR);
m_datR = m_datR.SubReader(offset, m_datR.Size() - offset);
}
};
-template <typename ReaderT>
class FeaturesVector
{
public:
- typedef ReaderT ReaderType;
-
- FeaturesVector(FeatureReaders<ReaderT> const & dataR)
- : m_RecordReader(dataR.m_datR, 256), m_source(dataR.m_geomR, dataR.m_trgR)
+ FeaturesVector(FeatureReaders const & dataR)
+ : m_RecordReader(dataR.m_datR, 256), m_source(dataR.m_cont)
{
}
@@ -81,6 +75,6 @@ private:
}
};
- VarRecordReader<ReaderT, &VarRecordSizeReaderVarint> m_RecordReader;
+ VarRecordReader<FileReader, &VarRecordSizeReaderVarint> m_RecordReader;
mutable FeatureType::read_source_t m_source;
};