mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
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
This commit is contained in:
45
routing/routing_tests/road_graph_builder.hpp
Normal file
45
routing/routing_tests/road_graph_builder.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user