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

Method AddLine

libs/drape_frontend/drape_api.cpp:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14void DrapeApi::AddLine(std::string const & id, DrapeApiLineData const & data)
15{
16 DrapeEngineLockGuard lock(m_engine);
17 if (!lock)
18 return;
19
20 auto & threadCommutator = lock.Get()->m_threadCommutator;
21 auto const it = m_lines.find(id);
22 if (it != m_lines.end())
23 {
24 threadCommutator->PostMessage(ThreadsCommutator::ResourceUploadThread, make_unique_dp<DrapeApiRemoveMessage>(id),
25 MessagePriority::Normal);
26 }
27
28 m_lines[id] = data;
29
30 TLines lines;
31 lines.insert(std::make_pair(id, data));
32 threadCommutator->PostMessage(ThreadsCommutator::ResourceUploadThread, make_unique_dp<DrapeApiAddLinesMessage>(lines),
33 MessagePriority::Normal);
34}
35
36void DrapeApi::RemoveLine(std::string const & id)
37{

Callers

nothing calls this directly

Calls 5

GetMethod · 0.45
findMethod · 0.45
endMethod · 0.45
PostMessageMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected