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

Function MakeNumMwmTree

libs/storage/routing_helpers.cpp:12–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10{
11
12std::unique_ptr<m4::Tree<routing::NumMwmId>> MakeNumMwmTree(NumMwmIds const & numMwmIds,
13 storage::CountryInfoGetter const & countryInfoGetter)
14{
15 auto tree = std::make_unique<m4::Tree<NumMwmId>>();
16
17 numMwmIds.ForEachId([&](NumMwmId numMwmId)
18 {
19 auto const & countryName = numMwmIds.GetFile(numMwmId).GetName();
20 tree->Add(numMwmId, countryInfoGetter.GetLimitRectForLeaf(countryName));
21 });
22
23 return tree;
24}
25
26std::shared_ptr<routing::NumMwmIds> CreateNumMwmIds(storage::Storage const & storage)
27{

Callers 6

ParseTracksFunction · 0.85
SetRouterImplMethod · 0.85
CreateVehicleRouterFunction · 0.85
InitRouterMethod · 0.85

Calls 5

ForEachIdMethod · 0.80
GetFileMethod · 0.80
GetLimitRectForLeafMethod · 0.80
GetNameMethod · 0.45
AddMethod · 0.45

Tested by 1

CreateVehicleRouterFunction · 0.68