Files
comaps/routing/fake_edges_container.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

40 lines
902 B
C++

#pragma once
#include "routing/fake_graph.hpp"
#include "routing/fake_vertex.hpp"
#include "routing/index_graph_starter.hpp"
#include "routing/segment.hpp"
#include <cstddef>
#include <cstdint>
#include <limits>
#include <utility>
namespace routing
{
class FakeEdgesContainer final
{
friend class IndexGraphStarter;
public:
FakeEdgesContainer(IndexGraphStarter && starter)
: m_finish(std::move(starter.m_finish))
, m_fake(std::move(starter.m_fake))
{
}
uint32_t GetNumFakeEdges() const
{
// Maximal number of fake segments in fake graph is numeric_limits<uint32_t>::max()
// because segment idx type is uint32_t.
CHECK_LESS_OR_EQUAL(m_fake.GetSize(), std::numeric_limits<uint32_t>::max(), ());
return static_cast<uint32_t>(m_fake.GetSize());
}
private:
// Finish ending.
IndexGraphStarter::Ending m_finish;
FakeGraph m_fake;
};
} // namespace routing