| 28 | } |
| 29 | |
| 30 | CBV CategoriesCache::Load(MwmContext const & context) const |
| 31 | { |
| 32 | auto const & c = classif(); |
| 33 | |
| 34 | // Any DFA will do, since we only use requests's m_categories, |
| 35 | // but the interface of Retrieval forces us to make a choice. |
| 36 | SearchTrieRequest<strings::UniStringDFA> request; |
| 37 | |
| 38 | // m_categories usually has truncated types; add them together with their subtrees. |
| 39 | m_categories.ForEach([&request, &c](uint32_t const type) |
| 40 | { |
| 41 | c.ForEachInSubtree([&](uint32_t descendantType) |
| 42 | { |
| 43 | if (c.IsTypeValid(descendantType)) |
| 44 | request.m_categories.emplace_back(FeatureTypeToString(c.GetIndexForType(descendantType))); |
| 45 | }, type); |
| 46 | }); |
| 47 | |
| 48 | Retrieval retrieval(context, m_cancellable); |
| 49 | return retrieval.RetrieveAddressFeatures(request).m_features; |
| 50 | } |
| 51 | |
| 52 | // StreetsCache ------------------------------------------------------------------------------------ |
| 53 | StreetsCache::StreetsCache(base::Cancellable const & cancellable) |
nothing calls this directly
no test coverage detected