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

Method SetDrapeEngine

libs/map/search_mark.cpp:494–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492SearchMarks::SearchMarks() : m_bmManager(nullptr) {}
493
494void SearchMarks::SetDrapeEngine(ref_ptr<df::DrapeEngine> engine)
495{
496 m_drapeEngine.Set(engine);
497 if (engine == nullptr)
498 return;
499
500 std::vector<std::string> symbols;
501 for (uint8_t t = 0; t < SearchMarkType::Count; ++t)
502 symbols.push_back(GetSymbol(static_cast<SearchMarkType>(t)));
503
504 base::SortUnique(symbols);
505
506 m_drapeEngine.SafeCall(&df::DrapeEngine::RequestSymbolsSize, symbols,
507 [this](std::map<std::string, m2::PointF> && sizes)
508 {
509 GetPlatform().RunTask(Platform::Thread::Gui, [this, sizes = std::move(sizes)]() mutable
510 {
511 s_markSizes = std::move(sizes);
512 UpdateMaxDimension();
513 });
514 });
515}
516
517void SearchMarks::SetBookmarkManager(BookmarkManager * bmManager)
518{

Callers 2

CreateDrapeEngineMethod · 0.45
DestroyDrapeEngineMethod · 0.45

Calls 5

SortUniqueFunction · 0.85
SafeCallMethod · 0.80
RunTaskMethod · 0.80
SetMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected