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

Function FromString

libs/routing/router.cpp:22–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22RouterType FromString(std::string const & str)
23{
24 if (str == "vehicle")
25 return RouterType::Vehicle;
26 if (str == "pedestrian")
27 return RouterType::Pedestrian;
28 if (str == "bicycle")
29 return RouterType::Bicycle;
30 if (str == "transit")
31 return RouterType::Transit;
32 if (str == "ruler")
33 return RouterType::Ruler;
34
35 ASSERT(false, ("Incorrect routing string:", str));
36 return RouterType::Vehicle;
37}
38
39std::string DebugPrint(RouterType type)
40{

Callers 1

UNIT_TESTFunction · 0.50

Calls 1

ASSERTFunction · 0.85

Tested by 1

UNIT_TESTFunction · 0.40