Exemplo n.º 1
0
bool ReadVersion(FilesContainerR const & container, MwmVersion & version)
{
  if (!container.IsExist(VERSION_FILE_TAG))
    return false;

  ModelReaderPtr versionReader = container.GetReader(VERSION_FILE_TAG);
  ReaderSource<ModelReaderPtr> src(versionReader);
  ReadVersionT(src, version);
  return true;
}
Exemplo n.º 2
0
  // static
  unique_ptr<FeaturesOffsetsTable> FeaturesOffsetsTable::CreateImpl(
      platform::LocalCountryFile const & localFile,
      FilesContainerR const & cont, string const & storePath)
  {
    LOG(LINFO, ("Creating features offset table file", storePath));

    CountryIndexes::PreparePlaceOnDisk(localFile);

    Builder builder;
    FeaturesVector::ForEachOffset(cont.GetReader(DATA_FILE_TAG), [&builder] (uint32_t offset)
    {
      builder.PushOffset(offset);
    });

    unique_ptr<FeaturesOffsetsTable> table(Build(builder));
    table->Save(storePath);
    return table;
  }