blob: 694d08867fcb021006dcf11cffa680405e0af5ed (
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
|
#pragma once
#include "indexer/centers_table.hpp"
#include "coding/file_container.hpp"
#include "geometry/point2d.hpp"
#include "std/unique_ptr.hpp"
class MwmValue;
namespace search
{
class LazyCentersTable
{
public:
enum State
{
STATE_NOT_LOADED,
STATE_LOADED,
STATE_FAILED
};
explicit LazyCentersTable(MwmValue & value);
inline State GetState() const { return m_state; }
void EnsureTableLoaded();
WARN_UNUSED_RESULT bool Get(uint32_t id, m2::PointD & center);
private:
MwmValue & m_value;
State m_state;
FilesContainerR::TReader m_reader;
unique_ptr<CentersTable> m_table;
};
} // namespace search
|