diff options
author | Yuri Gorshenin <y@maps.me> | 2016-09-21 17:25:16 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-09-27 16:29:47 +0300 |
commit | 5951f4c0f834a139a78aa375e839b84ebde75bd4 (patch) | |
tree | 55313679578a29fa47aa07078334377692189bc0 /search/geocoder.hpp | |
parent | 87312eac6498904a0f33cf51fe3524aff83b61cc (diff) |
[search] Fixed locality matching code.
Diffstat (limited to 'search/geocoder.hpp')
-rw-r--r-- | search/geocoder.hpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/search/geocoder.hpp b/search/geocoder.hpp index 715e4250a3..d6b30a1e1d 100644 --- a/search/geocoder.hpp +++ b/search/geocoder.hpp @@ -1,7 +1,8 @@ #pragma once #include "search/cancel_exception.hpp" -#include "search/categories_set.hpp" +#include "search/categories_cache.hpp" +#include "search/cbv.hpp" #include "search/features_layer.hpp" #include "search/features_layer_path_finder.hpp" #include "search/geocoder_context.hpp" @@ -136,7 +137,8 @@ public: }; Geocoder(Index const & index, storage::CountryInfoGetter const & infoGetter, - PreRanker & preRanker, my::Cancellable const & cancellable); + PreRanker & preRanker, VillagesCache & villagesCache, + my::Cancellable const & cancellable); ~Geocoder(); @@ -257,12 +259,6 @@ private: // UNCLASSIFIED objects that match to all currently unused tokens. void MatchUnclassified(BaseContext & ctx, size_t curToken); - CBV LoadCategories(MwmContext & context, CategoriesSet const & categories); - - CBV LoadStreets(MwmContext & context); - - CBV LoadVillages(MwmContext & context); - // A wrapper around RetrievePostcodeFeatures. CBV RetrievePostcodeFeatures(MwmContext const & context, TokenSlice const & slice); @@ -278,10 +274,10 @@ private: storage::CountryInfoGetter const & m_infoGetter; - my::Cancellable const & m_cancellable; + StreetsCache m_streetsCache; + VillagesCache & m_villagesCache; - CategoriesSet m_streets; - CategoriesSet m_villages; + my::Cancellable const & m_cancellable; // Geocoder params. Params m_params; @@ -309,9 +305,6 @@ private: PivotRectsCache m_pivotRectsCache; LocalityRectsCache m_localityRectsCache; - // Cache of street ids in mwms. - map<MwmSet::MwmId, CBV> m_streetsCache; - // Postcodes features in the mwm that is currently being processed. Postcodes m_postcodes; |