blob: a1fc055371bacd527017aece05fe4b18cd23e5c7 (
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
|
#include "indexer/feature_decl.hpp"
#include <sstream>
using namespace std;
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";
}
UNREACHABLE();
}
// 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;
}
|