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

46 lines
1.4 KiB
C++

#pragma once
#include "routing_algorithm.hpp"
#include "routing/road_graph.hpp"
#include "routing_common/maxspeed_conversion.hpp"
#include "routing_common/vehicle_model.hpp"
#include <utility>
#include <vector>
namespace routing_test
{
class RoadGraphMockSource : public RoadGraphIFace
{
public:
void AddRoad(RoadInfo && ri);
inline size_t GetRoadCount() const { return m_roads.size(); }
/// @name RoadGraphIFace overrides:
/// @{
RoadInfo GetRoadInfo(FeatureID const & f, routing::SpeedParams const & speedParams) const override;
double GetSpeedKMpH(FeatureID const & featureId, routing::SpeedParams const & speedParams) const override;
double GetMaxSpeedKMpH() const override;
/// @}
void ForEachFeatureClosestToCross(m2::PointD const & cross,
ICrossEdgesLoader & edgeLoader) const override;
void GetFeatureTypes(FeatureID const & featureId, feature::TypesHolder & types) const override;
void GetJunctionTypes(geometry::PointWithAltitude const & junction,
feature::TypesHolder & types) const override;
routing::IRoadGraph::Mode GetMode() const override;
private:
std::vector<RoadInfo> m_roads;
};
FeatureID MakeTestFeatureID(uint32_t offset);
void InitRoadGraphMockSourceWithTest1(RoadGraphMockSource & graphMock);
void InitRoadGraphMockSourceWithTest2(RoadGraphMockSource & graphMock);
} // namespace routing_test