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

Method ReadFeatures

libs/drape_frontend/tile_info.cpp:50–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void TileInfo::ReadFeatures(MapDataProvider const & model)
51{
52#if defined(DRAPE_MEASURER_BENCHMARK) && defined(TILES_STATISTIC)
53 DrapeMeasurer::Instance().StartTileReading();
54#endif
55 m_context->BeginReadTile();
56
57 // Reading can be interrupted by exception throwing
58 SCOPE_GUARD(ReleaseReadTile, std::bind(&EngineContext::EndReadTile, m_context.get()));
59
60 ReadFeatureIndex(model);
61 ThrowIfCancelled();
62
63 m_context->GetMetalineManager()->Update(m_mwms);
64
65 if (!m_featureInfo.empty())
66 {
67 std::sort(m_featureInfo.begin(), m_featureInfo.end());
68
69 RuleDrawer drawer(std::bind(&TileInfo::IsCancelled, this), model.m_isCountryLoadedByName, make_ref(m_context),
70 m_context->GetMapLangIndex());
71 model.ReadFeatures(std::bind<void>(std::ref(drawer), _1), m_featureInfo);
72#ifdef DRAW_TILE_NET
73 drawer.DrawTileNet();
74#endif
75 }
76#if defined(DRAPE_MEASURER_BENCHMARK) && defined(TILES_STATISTIC)
77 DrapeMeasurer::Instance().EndTileReading();
78#endif
79}
80
81void TileInfo::Cancel()
82{

Callers 3

ReadPointsFunction · 0.45
DoMethod · 0.45

Calls 12

make_refFunction · 0.85
StartTileReadingMethod · 0.80
BeginReadTileMethod · 0.80
GetMetalineManagerMethod · 0.80
GetMapLangIndexMethod · 0.80
DrawTileNetMethod · 0.80
EndTileReadingMethod · 0.80
getMethod · 0.65
UpdateMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected