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

feature_utils.hpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f627e284ecb56e4dfb5c3b137e9db3c6fab745cd (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

#include "geometry/rect2d.hpp"

#include "base/base.hpp"

struct FeatureID;
class StringUtf8Multilang;

namespace feature
{
  class TypesHolder;
  class RegionData;

  /// Get viewport scale to show given feature. Used in search.
  int GetFeatureViewportScale(TypesHolder const & types);

  /// Primary name using priority:
  /// - device language name;
  /// - international name;
  /// - english name.
  /// - transliterated name.
  /// Secondary name using priority:
  /// - default name;
  /// - international name;
  /// - country language name;
  /// - english name.
  /// In case when primary name is empty it will be propagated from secondary and secondary will be
  /// cleared. In case when primary name contains secondary name then secondary will be cleared.
  void GetPreferredNames(RegionData const & regionData, StringUtf8Multilang const & src,
                         int8_t const deviceLang, bool allowTranslit, string & primary, string & secondary);

  /// When MWM contains user's language, the priority is the following:
  /// - device language name;
  /// - default name;
  /// - international name;
  /// - english name;
  /// - transliterated name;
  /// - country language name.
  /// When MWM does not contain user's language, the priority is the following:
  /// - device language name;
  /// - international name;
  /// - english name;
  /// - transliterated name;
  /// - default name;
  /// - country language name.
  void GetReadableName(RegionData const & regionData, StringUtf8Multilang const & src,
                       int8_t const deviceLang, bool allowTranslit, string & out);
}  // namespace feature