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

Method Update

libs/drape_frontend/metaline_manager.cpp:29–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void MetalineManager::Update(std::set<MwmSet::MwmId> const & mwms)
30{
31 std::lock_guard<std::mutex> lock(m_mwmsMutex);
32 for (auto const & mwm : mwms)
33 {
34 ASSERT(mwm.IsAlive(), ());
35 if (mwm.GetInfo()->GetType() != MwmInfo::MwmTypeT::COUNTRY || !m_mwms.insert(mwm).second)
36 continue;
37
38 auto readingTask = std::make_shared<ReadMetalineTask>(m_model, mwm);
39 auto routine = dp::DrapeRoutine::Run([this, readingTask]()
40 {
41 readingTask->Run();
42 OnTaskFinished(readingTask);
43 });
44
45 if (routine)
46 m_activeTasks.Add(std::move(readingTask), std::move(routine));
47 }
48}
49
50m2::SharedSpline MetalineManager::GetMetaline(FeatureID const & fid) const
51{

Callers

nothing calls this directly

Calls 7

ASSERTFunction · 0.85
IsAliveMethod · 0.45
GetTypeMethod · 0.45
GetInfoMethod · 0.45
insertMethod · 0.45
RunMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected