MCPcopy Create free account
hub / github.com/comaps/comaps / CreateIndexGraph

Function CreateIndexGraph

generator/restriction_generator.cpp:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31using namespace routing;
32
33std::unique_ptr<IndexGraph> CreateIndexGraph(std::string const & mwmPath, std::string const & country,
34 CountryParentNameGetterFn const & countryParentNameGetterFn)
35{
36 std::shared_ptr<VehicleModelInterface> vehicleModel =
37 CarModelFactory(countryParentNameGetterFn).GetVehicleModelForCountry(country);
38
39 MwmValue mwmValue(platform::LocalCountryFile::MakeTemporary(mwmPath));
40
41 auto graph =
42 std::make_unique<IndexGraph>(std::make_shared<Geometry>(GeometryLoader::CreateFromFile(mwmPath, vehicleModel)),
43 EdgeEstimator::Create(VehicleType::Car, *vehicleModel, nullptr /* trafficStash */,
44 nullptr /* dataSource */, nullptr /* numMvmIds */));
45
46 DeserializeIndexGraph(mwmValue, VehicleType::Car, *graph);
47 return graph;
48}
49
50void SerializeRestrictions(RestrictionCollector & restrictionCollector, std::string const & mwmPath)
51{

Callers 4

TestMaxspeedsSectionFunction · 0.85
generator_tool.cppFile · 0.85
BuildRoutingMethod · 0.85

Calls 4

CarModelFactoryClass · 0.85
CreateFunction · 0.85
DeserializeIndexGraphFunction · 0.85

Tested by 2

TestMaxspeedsSectionFunction · 0.68
BuildRoutingMethod · 0.68