/srv/osrm/osrm-backend/include/server/api
Edit: /srv/osrm/osrm-backend/include/server/api/parameters_parser.hpp (1521B)
#ifndef SERVER_API_ROUTE_PARAMETERS_PARSER_HPP
#define SERVER_API_ROUTE_PARAMETERS_PARSER_HPP
#include "engine/api/base_parameters.hpp"
#include "engine/api/tile_parameters.hpp"
#include
#include
namespace osrm::server::api
{
// Note: this file provides only the interface for the generic parseParameters function.
// The actual implementations for each concrete parameter type live in the cpp file.
namespace detail
{
template
using is_parameter_t =
std::integral_constant::value ||
std::is_same::value>;
} // namespace detail
// Starts parsing and iter and modifies it until iter == end or parsing failed
template ::value, int>::type = 0>
boost::optional parseParameters(std::string::iterator &iter,
const std::string::iterator end);
// Copy on purpose because we need mutability
template ::value, int>::type = 0>
boost::optional parseParameters(std::string options_string)
{
auto first = options_string.begin();
const auto last = options_string.end();
return parseParameters(first, last);
}
} // namespace osrm::server::api
#endif