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>2015-10-09 18:46:57 +0300
committervng <viktor.govako@gmail.com>2015-10-12 12:36:38 +0300
commit93fb8cdc33a6a515c4de798f773680db1562a05d (patch)
treec3acb62800885690efe760492b385fd93eb0fce2 /indexer/features_offsets_table.hpp
parentf4082a8ef7f6a7057f66afb7369101bc59937cd7 (diff)
[mwm] Put feature offsets table into MWM container.
Diffstat (limited to 'indexer/features_offsets_table.hpp')
-rw-r--r--indexer/features_offsets_table.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indexer/features_offsets_table.hpp b/indexer/features_offsets_table.hpp
index b1b52f4ddb..d7862657fa 100644
--- a/indexer/features_offsets_table.hpp
+++ b/indexer/features_offsets_table.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "coding/file_container.hpp"
#include "coding/mmap_reader.hpp"
#include "defines.hpp"
@@ -12,7 +13,6 @@
#include "3party/succinct/mapper.hpp"
-class FilesContainerR;
namespace platform
{
class LocalCountryFile;
@@ -57,6 +57,10 @@ namespace feature
/// Load table by full path to the table file.
static unique_ptr<FeaturesOffsetsTable> Load(string const & filePath);
+ static unique_ptr<FeaturesOffsetsTable> Load(FilesContainerR const & cont);
+ static unique_ptr<FeaturesOffsetsTable> Build(FilesContainerR const & cont,
+ string const & storePath);
+
/// Get table for the MWM map, represented by localFile and cont.
static unique_ptr<FeaturesOffsetsTable> CreateIfNotExistsAndLoad(
platform::LocalCountryFile const & localFile, FilesContainerR const & cont);
@@ -94,6 +98,7 @@ namespace feature
private:
FeaturesOffsetsTable(succinct::elias_fano::elias_fano_builder & builder);
FeaturesOffsetsTable(string const & filePath);
+ FeaturesOffsetsTable() = default;
static unique_ptr<FeaturesOffsetsTable> LoadImpl(string const & filePath);
static unique_ptr<FeaturesOffsetsTable> CreateImpl(platform::LocalCountryFile const & localFile,
@@ -101,7 +106,9 @@ namespace feature
string const & storePath);
succinct::elias_fano m_table;
-
unique_ptr<MmapReader> m_pReader;
+
+ detail::MappedFile m_file;
+ detail::MappedFile::Handle m_handle;
};
} // namespace feature