| 12 | } |
| 13 | |
| 14 | void 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 | |
| 36 | void DrapeApi::RemoveLine(std::string const & id) |
| 37 | { |
nothing calls this directly
no test coverage detected