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

geocoder_locality.cpp « search - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2cf619eff04c74297f12c8630d4be5673631abcc (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
#include "search/geocoder_locality.hpp"

#include <sstream>

namespace search
{
// static
Model::Type Region::ToModelType(Type type)
{
  switch (type)
  {
  case Region::TYPE_STATE: return Model::TYPE_STATE;
  case Region::TYPE_COUNTRY: return Model::TYPE_COUNTRY;
  case Region::TYPE_COUNT: return Model::TYPE_COUNT;
  }
}

std::string DebugPrint(Locality const & locality)
{
  std::ostringstream os;
  os << "Locality [ ";
  os << "m_countryId=" << DebugPrint(locality.m_countryId) << ", ";
  os << "m_featureId=" << locality.m_featureId << ", ";
  os << "m_tokenRange=" << DebugPrint(locality.m_tokenRange) << ", ";
  os << " ]";
  return os.str();
}
}  // namespace search