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

Method GetVehicleModelForCountry

libs/routing_common/vehicle_model.cpp:252–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252shared_ptr<VehicleModelInterface> VehicleModelFactory::GetVehicleModelForCountry(string const & country) const
253{
254 string parent = country;
255 while (!parent.empty())
256 {
257 auto it = m_models.find(parent);
258 if (it != m_models.end())
259 return it->second;
260
261 parent = GetParent(parent);
262 }
263
264 return GetVehicleModel();
265}
266
267string VehicleModelFactory::GetParent(string const & country) const
268{

Callers 15

TrackMatcherMethod · 0.45
CmdTrackFunction · 0.45
CmdTracksFunction · 0.45
CmdTagsTableFunction · 0.45
VehicleMaskBuilderMethod · 0.45
FillWeightsFunction · 0.45
CreateIndexGraphFunction · 0.45
GetVehicleModelMethod · 0.45
CreateIndexGraphMethod · 0.45
CreateGeometryMethod · 0.45
CalcMaxSpeedFunction · 0.45
TestVehicleModelDefaultFunction · 0.45

Calls 3

emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by 4

TestVehicleModelDefaultFunction · 0.36
ParentTestFunction · 0.36
GetModelMethod · 0.36