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: ae99550ec050fbccde529e1a699f640ac12bc033 (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
#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