Refactor edge unpacking so that it's CH indepenent and we don't repeat ourselves so much.

This commit is contained in:
Daniel Patterson
2016-08-22 23:26:48 -07:00
committed by Moritz Kobitzsch
parent 14e7460465
commit c8eb2b2d11
8 changed files with 301 additions and 296 deletions
@@ -66,6 +66,10 @@ class BaseDataFacade
virtual EdgeID
FindEdgeIndicateIfReverse(const NodeID from, const NodeID to, bool &result) const = 0;
virtual EdgeID FindSmallestEdge(const NodeID from,
const NodeID to,
const std::function<bool(EdgeData)> filter) const = 0;
// node and edge information access
virtual util::Coordinate GetCoordinateOfNode(const unsigned id) const = 0;
virtual OSMNodeID GetOSMNodeIDOfNode(const unsigned id) const = 0;
@@ -472,6 +472,13 @@ class InternalDataFacade final : public BaseDataFacade
return m_query_graph->FindEdgeIndicateIfReverse(from, to, result);
}
EdgeID FindSmallestEdge(const NodeID from,
const NodeID to,
std::function<bool(EdgeData)> filter) const override final
{
return m_query_graph->FindSmallestEdge(from, to, filter);
}
// node and edge information access
util::Coordinate GetCoordinateOfNode(const unsigned id) const override final
{
@@ -507,6 +507,13 @@ class SharedDataFacade final : public BaseDataFacade
return m_query_graph->FindEdgeIndicateIfReverse(from, to, result);
}
EdgeID FindSmallestEdge(const NodeID from,
const NodeID to,
std::function<bool(EdgeData)> filter) const override final
{
return m_query_graph->FindSmallestEdge(from, to, filter);
}
// node and edge information access
util::Coordinate GetCoordinateOfNode(const NodeID id) const override final
{