New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View 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