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

Method Processor

libs/search/processor.cpp:150–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148} // namespace
149
150Processor::Processor(DataSource const & dataSource, CategoriesHolder const & categories,
151 vector<Suggest> const & suggests, storage::CountryInfoGetter const & infoGetter)
152 : m_categories(categories)
153 , m_infoGetter(infoGetter)
154 , m_dataSource(dataSource)
155 , m_localitiesCaches(static_cast<base::Cancellable const &>(*this))
156 , m_citiesBoundaries(m_dataSource)
157 , m_keywordsScorer(LanguageTier::LANGUAGE_TIER_COUNT)
158 , m_ranker(m_dataSource, m_citiesBoundaries, infoGetter, m_keywordsScorer, m_emitter, categories, suggests,
159 m_localitiesCaches.m_villages, static_cast<base::Cancellable const &>(*this))
160 , m_preRanker(m_dataSource, m_ranker)
161 , m_geocoder(m_dataSource, infoGetter, categories, m_citiesBoundaries, m_preRanker, m_localitiesCaches,
162 static_cast<base::Cancellable const &>(*this))
163 , m_bookmarksProcessor(m_emitter, static_cast<base::Cancellable const &>(*this))
164{
165 // Current and input langs are to be set later.
166 m_keywordsScorer.SetLanguages(LanguageTier::LANGUAGE_TIER_EN_AND_INTERNATIONAL,
167 {localisation::kInternationalNameIndex, localisation::kEnglishLanguageIndex});
168 m_keywordsScorer.SetLanguages(LanguageTier::LANGUAGE_TIER_DEFAULT, {localisation::kDefaultNameIndex});
169 m_keywordsScorer.SetLanguages(LanguageTier::LANGUAGE_TIER_ALT_AND_OLD,
170 {localisation::kAlternativeNameIndex, localisation::kOldNameIndex});
171
172 for (auto const & country : m_infoGetter.GetCountries())
173 m_countriesTrie.Add(country.m_countryId, true);
174}
175
176void Processor::SetViewport(m2::RectD const & viewport)
177{

Callers

nothing calls this directly

Calls 2

SetLanguagesMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected