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

Method ProcessWay

src/extractor/scripting_environment_lua.cpp:1389–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1387}
1388
1389void LuaScriptingContext::ProcessWay(const osmium::Way &way,
1390 ExtractionWay &result,
1391 const ExtractionRelationContainer &relations)
1392{
1393 BOOST_ASSERT(state.lua_state() != nullptr);
1394
1395 sol::protected_function_result luares;
1396
1397 // TODO check for api version, make sure luares is always set
1398 switch (api_version)
1399 {
1400 case 4:
1401 case 3:
1402 luares =
1403 way_function(profile_table, std::cref(way), std::ref(result), std::cref(relations));
1404 break;
1405 case 2:
1406 luares = way_function(profile_table, std::cref(way), std::ref(result));
1407 break;
1408 case 1:
1409 case 0:
1410 luares = way_function(std::cref(way), std::ref(result));
1411 break;
1412 }
1413
1414 if (!luares.valid())
1415 handle_lua_error(luares);
1416}
1417
1418} // namespace osrm::extractor

Callers 1

ProcessElementsMethod · 0.45

Calls 2

handle_lua_errorFunction · 0.85
validMethod · 0.45

Tested by

no test coverage detected