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

suggest.hpp « search - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fe0fff8645d882f77777cf0fb81131950e8a5480 (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
#pragma once

#include "search/common.hpp"
#include "search/intermediate_result.hpp"

#include "base/string_utils.hpp"

#include <cstdint>
#include <string>

namespace search
{
struct Suggest
{
  Suggest(strings::UniString const & name, uint8_t len, int8_t locale)
    : m_name(name), m_prefixLength(len), m_locale(locale)
  {
  }

  strings::UniString m_name;
  uint8_t m_prefixLength;
  int8_t m_locale;
};

void GetSuggestion(RankerResult const & res, std::string const & query,
                   QueryTokens const & paramTokens, strings::UniString const & prefix,
                   std::string & suggest);
}  // namespace search