Renaming utility function to set the name of the used routing service

(plugin)
This commit is contained in:
DennisOSRM 2012-09-12 15:38:04 +02:00
parent 1c50c55a42
commit 954710d6cc
3 changed files with 9 additions and 9 deletions

View File

@ -56,7 +56,7 @@ struct RouteParameters {
printInstructions = b; printInstructions = b;
} }
void printService( const std::string & s) { void setService( const std::string & s) {
service = s; service = s;
} }

View File

@ -32,7 +32,7 @@ namespace qi = boost::spirit::qi;
template <typename Iterator, class HandlerT> template <typename Iterator, class HandlerT>
struct APIGrammar : qi::grammar<Iterator> { struct APIGrammar : qi::grammar<Iterator> {
APIGrammar(HandlerT * h) : APIGrammar::base_type(api_call), handler(h) { APIGrammar(HandlerT * h) : APIGrammar::base_type(api_call), handler(h) {
api_call = qi::lit('/') >> string[boost::bind(&HandlerT::printService, handler, ::_1)] >> ('?') >> query; api_call = qi::lit('/') >> string[boost::bind(&HandlerT::setService, handler, ::_1)] >> ('?') >> query;
query = (*(zoom | output | jsonp | checksum | location | hint | compressed_geometry | language | instruction) ) ; query = (*(zoom | output | jsonp | checksum | location | hint | compressed_geometry | language | instruction) ) ;
zoom = (-qi::lit('&')) >> qi::lit('z') >> '=' >> qi::short_[boost::bind(&HandlerT::setZoomLevel, handler, ::_1)]; zoom = (-qi::lit('&')) >> qi::lit('z') >> '=' >> qi::short_[boost::bind(&HandlerT::setZoomLevel, handler, ::_1)];

View File

@ -2,10 +2,10 @@ Threads = 8
IP = 0.0.0.0 IP = 0.0.0.0
Port = 5000 Port = 5000
hsgrData=/opt/osm/baden-wuerttemberg.osrm.hsgr hsgrData=/opt/osm/berlin.osrm.hsgr
nodesData=/opt/osm/baden-wuerttemberg.osrm.nodes nodesData=/opt/osm/berlin.osrm.nodes
edgesData=/opt/osm/baden-wuerttemberg.osrm.edges edgesData=/opt/osm/berlin.osrm.edges
ramIndex=/opt/osm/baden-wuerttemberg.osrm.ramIndex ramIndex=/opt/osm/berlin.osrm.ramIndex
fileIndex=/opt/osm/baden-wuerttemberg.osrm.fileIndex fileIndex=/opt/osm/berlin.osrm.fileIndex
namesData=/opt/osm/baden-wuerttemberg.osrm.names namesData=/opt/osm/berlin.osrm.names
timestamp=/opt/osm/baden-wuerttemberg.osrm.timestamp timestamp=/opt/osm/berlin.osrm.timestamp