Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_search_engine.cpp « search_tests_support « search - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 54c539bf29435bc64374b52cb25c7e634f55b095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "search/search_tests_support/test_search_engine.hpp"

#include "indexer/categories_holder.hpp"

#include "platform/platform.hpp"

#include <utility>

using namespace std;

namespace search
{
namespace tests_support
{
TestSearchEngine::TestSearchEngine(DataSource & dataSource,
                                   unique_ptr<storage::CountryInfoGetter> infoGetter,
                                   Engine::Params const & params)
  : m_infoGetter(move(infoGetter))
  , m_engine(dataSource, GetDefaultCategories(), *m_infoGetter, params)
{
}

TestSearchEngine::TestSearchEngine(DataSource & dataSource, Engine::Params const & params)
  : m_infoGetter(storage::CountryInfoReader::CreateCountryInfoReader(GetPlatform()))
  , m_engine(dataSource, GetDefaultCategories(), *m_infoGetter, params)
{
}

weak_ptr<::search::ProcessorHandle> TestSearchEngine::Search(::search::SearchParams const & params)
{
  return m_engine.Search(params);
}
}  // namespace tests_support
}  // namespace search