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

Method FillPointInfoForBookmark

libs/map/framework.cpp:588–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588void Framework::FillPointInfoForBookmark(Bookmark const & bmk, place_page::Info & info) const
589{
590 // Convert indices to sorted classifier types.
591 Classificator const & cl = classif();
592 buffer_vector<uint8_t, 8> types;
593 for (uint32_t i : bmk.GetData().m_featureTypes)
594 types.push_back(cl.GetTypeForIndex(i));
595 std::sort(types.begin(), types.end());
596
597 FillPointInfo(info, bmk.GetPivot(), {} /* customTitle */, [&types](FeatureType & ft)
598 {
599 if (types.empty() || ft.GetTypesCount() != types.size())
600 return false;
601
602 // Strict equal types.
603 feature::TypesHolder fTypes(ft);
604 std::sort(fTypes.begin(), fTypes.end());
605 return std::equal(types.begin(), types.end(), fTypes.begin(), fTypes.end());
606 });
607}
608
609void Framework::FillUserMarkInfo(UserMark const * mark, place_page::Info & outInfo)
610{

Callers

nothing calls this directly

Calls 9

GetDataMethod · 0.45
push_backMethod · 0.45
GetTypeForIndexMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetPivotMethod · 0.45
emptyMethod · 0.45
GetTypesCountMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected