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:
authorAlex Zolotarev <deathbaba@gmail.com>2010-12-05 19:24:16 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-22 22:33:57 +0300
commitd6e12b7ce4bcbf0ccd1c07eb25de143422913c34 (patch)
treea7e910c330ce4da9b4f2d8be76067adece2561c4 /indexer/index_builder.hpp
One Month In Minsk. Made in Belarus.
Diffstat (limited to 'indexer/index_builder.hpp')
-rw-r--r--indexer/index_builder.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indexer/index_builder.hpp b/indexer/index_builder.hpp
new file mode 100644
index 0000000000..b31353136a
--- /dev/null
+++ b/indexer/index_builder.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "scale_index_builder.hpp"
+
+namespace indexer
+{
+ template <class FeaturesVectorT, typename WriterT>
+ void BuildIndex(FeaturesVectorT const & featuresVector,
+ WriterT & writer,
+ string const & tmpFilePrefix)
+ {
+ {
+ LOG(LINFO, ("Building scale index."));
+ uint64_t indexSize;
+ {
+ SubWriter<WriterT> subWriter(writer);
+ IndexScales(featuresVector, subWriter, tmpFilePrefix);
+ indexSize = subWriter.Size();
+ }
+ LOG(LINFO, ("Built scale index. Size =", indexSize));
+ }
+ }
+
+ // doesn't throw exceptions
+ bool BuildIndexFromDatFile(string const & fullIndexFilePath,
+ string const & fullDatFilePath,
+ string const & tmpFilePath);
+}