Files
comaps/search/lazy_centers_table.hpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

42 lines
667 B
C++

#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