Add a commande line option to osrm-routed for max locations supported in distance table query

This commit is contained in:
Frédéric Rodrigo
2014-11-27 12:09:07 +01:00
committed by Frederic Rodrigo
parent 1d2f06df6d
commit e2605c2838
7 changed files with 30 additions and 16 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class OSRM
std::unique_ptr<OSRM_impl> OSRM_pimpl_;
public:
explicit OSRM(ServerPaths paths, const bool use_shared_memory = false);
explicit OSRM(ServerPaths paths, const bool use_shared_memory = false, const int max_locations_distance_table = 100);
~OSRM();
void RunQuery(RouteParameters &route_parameters, http::Reply &reply);
};
+4 -4
View File
@@ -57,7 +57,7 @@ namespace boost { namespace interprocess { class named_mutex; } }
#include <utility>
#include <vector>
OSRM_impl::OSRM_impl(ServerPaths server_paths, const bool use_shared_memory)
OSRM_impl::OSRM_impl(ServerPaths server_paths, const bool use_shared_memory, const int max_locations_distance_table)
{
if (use_shared_memory)
{
@@ -72,7 +72,7 @@ OSRM_impl::OSRM_impl(ServerPaths server_paths, const bool use_shared_memory)
}
// The following plugins handle all requests.
RegisterPlugin(new DistanceTablePlugin<BaseDataFacade<QueryEdge::EdgeData>>(query_data_facade));
RegisterPlugin(new DistanceTablePlugin<BaseDataFacade<QueryEdge::EdgeData>>(query_data_facade, max_locations_distance_table));
RegisterPlugin(new HelloWorldPlugin());
RegisterPlugin(new LocatePlugin<BaseDataFacade<QueryEdge::EdgeData>>(query_data_facade));
RegisterPlugin(new NearestPlugin<BaseDataFacade<QueryEdge::EdgeData>>(query_data_facade));
@@ -152,8 +152,8 @@ void OSRM_impl::RunQuery(RouteParameters &route_parameters, http::Reply &reply)
// proxy code for compilation firewall
OSRM::OSRM(ServerPaths paths, const bool use_shared_memory)
: OSRM_pimpl_(osrm::make_unique<OSRM_impl>(paths, use_shared_memory))
OSRM::OSRM(ServerPaths paths, const bool use_shared_memory, const int max_locations_distance_table)
: OSRM_pimpl_(osrm::make_unique<OSRM_impl>(paths, use_shared_memory, max_locations_distance_table))
{
}
+1 -1
View File
@@ -49,7 +49,7 @@ class OSRM_impl
using PluginMap = std::unordered_map<std::string, BasePlugin *>;
public:
OSRM_impl(ServerPaths paths, const bool use_shared_memory);
OSRM_impl(ServerPaths paths, const bool use_shared_memory, const int max_locations_distance_table);
OSRM_impl(const OSRM_impl &) = delete;
virtual ~OSRM_impl();
void RunQuery(RouteParameters &route_parameters, http::Reply &reply);