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

isolines_info.cpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 757cf30611b7f6764c2c15fa32acc818b957c6d3 (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
25
26
#include "indexer/isolines_info.hpp"

#include "indexer/data_source.hpp"

#include "defines.hpp"

namespace isolines
{
bool LoadIsolinesInfo(DataSource const & dataSource, MwmSet::MwmId const & mwmId,
                      IsolinesInfo & info)
{
  auto const handle = dataSource.GetMwmHandleById(mwmId);

  if (!handle.IsAlive())
    return false;

  auto const & value = *handle.GetValue();

  if (!value.m_cont.IsExist(ISOLINES_INFO_FILE_TAG))
    return false;

  auto readerPtr = value.m_cont.GetReader(ISOLINES_INFO_FILE_TAG);
  Deserializer deserializer(info);
  return deserializer.Deserialize(*readerPtr.GetPtr());
}
}  // namespace isolines