blob: d5ec9a2f1dd29e91b78b798e396f41c509552d16 (
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
|
#pragma once
#include <cstdint>
#include <memory>
class MwmValue;
namespace search
{
class HouseToStreetTable
{
public:
enum class StreetIdType
{
// Table stores the index number of the correct street corresponding
// to the house in the list of streets generated by ReverseGeocoder.
Index,
// Table stores feature id of street corresponding to the house.
FeatureId,
// Empty table.
None
};
virtual ~HouseToStreetTable() = default;
/// @todo Actually, value may be nullptr in the very common case.
/// It's better to construct a table from MwmHandle.
static std::unique_ptr<HouseToStreetTable> Load(MwmValue & value);
// Returns true and stores street identifier to |streetIndex|.
// Street identifier type depends on data version. See StreetIdType.
// Returns false if there is no such street.
virtual bool Get(uint32_t houseId, uint32_t & streetIndex) const = 0;
virtual StreetIdType GetStreetIdType() const = 0;
};
} // namespace search
|