MCPcopy Create free account
hub / github.com/comaps/comaps / SingleMwmDataSource

Method SingleMwmDataSource

generator/utils.cpp:78–89  ·  view source on GitHub ↗

SingleMwmDataSource -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

76
77// SingleMwmDataSource -----------------------------------------------------------------------------
78SingleMwmDataSource::SingleMwmDataSource(std::string const & mwmPath)
79{
80 m_countryFile = platform::LocalCountryFile::MakeTemporary(mwmPath);
81 m_countryFile.SyncWithDisk();
82 CHECK(m_countryFile.OnDisk(MapFileType::Map),
83 ("No correct mwm corresponding to local country file:", m_countryFile, ". Path:", mwmPath));
84
85 auto const result = m_dataSource.Register(m_countryFile);
86 CHECK_EQUAL(result.second, MwmSet::RegResult::Success, ());
87 CHECK(result.first.IsAlive(), ());
88 m_mwmId = result.first;
89}
90
91FeatureGetter::FeatureGetter(std::string const & countryFullPath)
92 : m_mwm(countryFullPath)

Callers

nothing calls this directly

Calls 4

SyncWithDiskMethod · 0.80
OnDiskMethod · 0.80
RegisterMethod · 0.80
IsAliveMethod · 0.45

Tested by

no test coverage detected