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

Function RetrievePostcodeFeaturesImpl

libs/search/retrieval.cpp:280–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278
279template <typename Value>
280Retrieval::ExtendedFeatures RetrievePostcodeFeaturesImpl(Retrieval::TrieRoot<Value> const & root,
281 MwmContext const & context,
282 base::Cancellable const & cancellable,
283 TokenSlice const & slice)
284{
285 EditedFeaturesHolder holder(context.GetId());
286 vector<uint64_t> features;
287 vector<uint64_t> exactlyMatchedFeatures;
288 FeaturesCollector collector(cancellable, features, exactlyMatchedFeatures);
289
290 MatchPostcodesInTrie(slice, root, [&holder](Value const & value)
291 { return !holder.ModifiedOrDeleted(base::asserted_cast<uint32_t>(value.m_featureId)); } /* filter */, collector);
292
293 holder.ForEachModifiedOrCreated([&](EditableMapObject const & emo, uint64_t index)
294 {
295 if (MatchFeatureByPostcode(emo, slice))
296 features.push_back(index);
297 });
298
299 return SortFeaturesAndBuildResult(std::move(features));
300}
301
302Retrieval::ExtendedFeatures RetrieveGeometryFeaturesImpl(MwmContext const & context,
303 base::Cancellable const & cancellable, m2::RectD const & rect,

Callers

nothing calls this directly

Calls 7

MatchPostcodesInTrieFunction · 0.85
MatchFeatureByPostcodeFunction · 0.85
ModifiedOrDeletedMethod · 0.80
GetIdMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected