Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
43
libs/routing/routing_tests/road_graph_builder.hpp
Normal file
43
libs/routing/routing_tests/road_graph_builder.hpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue