blob: 56ef2ce06f98bb48f05c9145ae1c9b8a76f0fc2d (
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
|
#include "indexer/feature_decl.hpp"
#include <sstream>
using namespace std;
namespace feature
{
string DebugPrint(GeomType type)
{
switch (type)
{
case GeomType::Undefined: return "Undefined";
case GeomType::Point: return "Point";
case GeomType::Line: return "Line";
case GeomType::Area: return "Area";
}
UNREACHABLE();
}
} // namespace feature
string DebugPrint(FeatureID const & id)
{
ostringstream ss;
ss << "{ " << DebugPrint(id.m_mwmId) << ", " << id.m_index << " }";
return ss.str();
}
// 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;
}
|