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

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

#include "std/sstream.hpp"

string DebugPrint(FeatureID const & id)
{
  ostringstream ss;
  ss << "{ " << DebugPrint(id.m_mwmId) << ", " << id.m_index << " }";
  return ss.str();
}

string DebugPrint(feature::EGeomType type)
{
  using feature::EGeomType;
  switch (type)
  {
  case EGeomType::GEOM_UNDEFINED: return "GEOM_UNDEFINED";
  case EGeomType::GEOM_POINT: return "GEOM_POINT";
  case EGeomType::GEOM_LINE: return "GEOM_LINE";
  case EGeomType::GEOM_AREA: return "GEOM_AREA";
  }
}

// static
char const * const FeatureID::kInvalidFileName = "INVALID";
// static
int64_t const FeatureID::kInvalidMwmVersion = -1;


string FeatureID::GetMwmName() const
{
  return IsValid() ? m_mwmId.GetInfo()->GetCountryName() : kInvalidFileName;
}

int64_t FeatureID::GetMwmVersion() const
{
  return IsValid() ? m_mwmId.GetInfo()->GetVersion() : kInvalidMwmVersion;
}