Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index_builder.hpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73147f166e9addf138f771817c17448117430f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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 & datFile, string const & tmpFile);
}