Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
41
libs/search/lazy_centers_table.hpp
Normal file
41
libs/search/lazy_centers_table.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include "indexer/centers_table.hpp"
|
||||
|
||||
#include "coding/files_container.hpp"
|
||||
|
||||
#include "geometry/point2d.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
class MwmValue;
|
||||
|
||||
namespace search
|
||||
{
|
||||
class LazyCentersTable
|
||||
{
|
||||
public:
|
||||
enum State
|
||||
{
|
||||
STATE_NOT_LOADED,
|
||||
STATE_LOADED,
|
||||
STATE_FAILED
|
||||
};
|
||||
|
||||
explicit LazyCentersTable(MwmValue const & value);
|
||||
|
||||
inline State GetState() const { return m_state; }
|
||||
|
||||
void EnsureTableLoaded();
|
||||
|
||||
[[nodiscard]] bool Get(uint32_t id, m2::PointD & center);
|
||||
|
||||
private:
|
||||
MwmValue const & m_value;
|
||||
State m_state;
|
||||
|
||||
FilesContainerR::TReader m_reader;
|
||||
std::unique_ptr<CentersTable> m_table;
|
||||
};
|
||||
} // namespace search
|
||||
Loading…
Add table
Add a link
Reference in a new issue