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

Method TraceResult

libs/search/geocoder.cpp:1747–1767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1745}
1746
1747void Geocoder::TraceResult(Tracer & tracer, BaseContext const & ctx, MwmSet::MwmId const & mwmId, uint32_t ftId,
1748 Model::Type type, TokenRange const & tokenRange)
1749{
1750 SCOPE_GUARD(emitParse, [&]() { tracer.EmitParse(ctx.m_tokens); });
1751
1752 if (!Model::IsPoiOrBuilding(type))
1753 return;
1754
1755 if (mwmId != m_context->GetId())
1756 return;
1757
1758 auto ft = m_context->GetFeature(ftId);
1759 if (!ft)
1760 return;
1761
1762 feature::TypesHolder holder(*ft);
1763 CategoriesInfo catInfo(holder, TokenSlice(m_params, tokenRange), m_params.m_categoryLocales, m_categories);
1764
1765 emitParse.release();
1766 tracer.EmitParse(ctx.m_tokens, catInfo.IsPureCategories());
1767}
1768
1769void Geocoder::EmitResult(BaseContext & ctx, FeatureID const & id, Model::Type type, TokenRange const & tokenRange,
1770 IntersectionResult const * geoParts, bool allTokensUsed, bool exactMatch)

Callers

nothing calls this directly

Calls 6

EmitParseMethod · 0.80
IsPureCategoriesMethod · 0.80
TokenSliceClass · 0.70
GetIdMethod · 0.45
GetFeatureMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected