blob: 2c0f93f88cf5cd3b31f8d3073660e1e980a60d8b (
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
|
#pragma once
#include "indexer/mwm_set.hpp"
#include "std/cstdint.hpp"
#include "std/string.hpp"
namespace feature
{
enum EGeomType
{
GEOM_UNDEFINED = -1,
// Note! do not change this values. Should be equal with FeatureGeoType.
GEOM_POINT = 0,
GEOM_LINE = 1,
GEOM_AREA = 2
};
}
struct FeatureID
{
MwmSet::MwmId m_mwmId;
uint32_t m_offset;
FeatureID() : m_offset(0) {}
FeatureID(MwmSet::MwmId const & mwmId, uint32_t offset) : m_mwmId(mwmId), m_offset(offset) {}
bool IsValid() const { return m_mwmId.IsAlive(); }
inline bool operator<(FeatureID const & r) const
{
if (m_mwmId == r.m_mwmId)
return m_offset < r.m_offset;
else
return m_mwmId < r.m_mwmId;
}
inline bool operator==(FeatureID const & r) const
{
return m_mwmId == r.m_mwmId && m_offset == r.m_offset;
}
inline bool operator!=(FeatureID const & r) const { return !(*this == r); }
friend string DebugPrint(FeatureID const & id);
};
|