diff --git a/include/server/api/parameters_parser.hpp b/include/server/api/parameters_parser.hpp index 87a441567..548f48aab 100644 --- a/include/server/api/parameters_parser.hpp +++ b/include/server/api/parameters_parser.hpp @@ -15,6 +15,9 @@ namespace server namespace 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::is_base_of; diff --git a/src/server/api/parameters_parser.cpp b/src/server/api/parameters_parser.cpp index 267605b13..c636659f7 100644 --- a/src/server/api/parameters_parser.cpp +++ b/src/server/api/parameters_parser.cpp @@ -2,6 +2,9 @@ #include "server/api/route_parameters_grammar.hpp" #include "server/api/table_parameter_grammar.hpp" +#include "server/api/nearest_parameter_grammar.hpp" +//#include "server/api/trip_parameter_grammar.hpp" +//#include "server/api/match_parameter_grammar.hpp" #include @@ -43,6 +46,28 @@ boost::optional parseParameters(std::string::itera return detail::parseParameters(iter, end); } +template <> +boost::optional parseParameters(std::string::iterator &iter, + std::string::iterator end) +{ + return detail::parseParameters(iter, + end); +} + +//template <> +//boost::optional parseParameters(std::string::iterator &iter, +// std::string::iterator end) +//{ +// return detail::parseParameters(iter, end); +//} +// +//template <> +//boost::optional parseParameters(std::string::iterator &iter, +// std::string::iterator end) +//{ +// return detail::parseParameters(iter, end); +//} + } // ns api } // ns server } // ns osrm