MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / toJSON

Function toJSON

src/engine/api/json_factory.cpp:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28{
29
30inline util::json::Array toJSON(const extractor::TurnLaneType::Mask lane_type)
31{
32 util::json::Array result;
33 std::bitset<8 * sizeof(extractor::TurnLaneType::Mask)> mask(lane_type);
34 for (auto index : util::irange<std::size_t>(0, extractor::TurnLaneType::NUM_TYPES))
35 {
36 if (mask[index])
37 {
38 result.values.push_back(extractor::TurnLaneType::laneTypeToName(index));
39 }
40 }
41 return result;
42}
43
44util::json::Array lanesFromIntersection(const guidance::IntermediateIntersection &intersection)
45{

Callers 1

lanesFromIntersectionFunction · 0.85

Calls 2

laneTypeToNameFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected