Collapses Double OSRM <-> Engine <-> .. PImpl Indirection, Resolves #3019.

This commit is contained in:
Daniel J. Hofmann
2016-10-14 15:55:21 +02:00
committed by Daniel J. H
parent 2a2abe9e0f
commit 18bc02f087
10 changed files with 75 additions and 117 deletions
+5 -5
View File
@@ -35,13 +35,13 @@ class MatchPlugin : public BasePlugin
Status HandleRequest(const std::shared_ptr<datafacade::BaseDataFacade> facade,
const api::MatchParameters &parameters,
util::json::Object &json_result);
util::json::Object &json_result) const;
private:
SearchEngineData heaps;
routing_algorithms::MapMatching<datafacade::BaseDataFacade> map_matching;
routing_algorithms::ShortestPathRouting<datafacade::BaseDataFacade> shortest_path;
int max_locations_map_matching;
mutable SearchEngineData heaps;
mutable routing_algorithms::MapMatching<datafacade::BaseDataFacade> map_matching;
mutable routing_algorithms::ShortestPathRouting<datafacade::BaseDataFacade> shortest_path;
const int max_locations_map_matching;
};
}
}
+4 -4
View File
@@ -22,12 +22,12 @@ class TablePlugin final : public BasePlugin
Status HandleRequest(const std::shared_ptr<datafacade::BaseDataFacade> facade,
const api::TableParameters &params,
util::json::Object &result);
util::json::Object &result) const;
private:
SearchEngineData heaps;
routing_algorithms::ManyToManyRouting<datafacade::BaseDataFacade> distance_table;
int max_locations_distance_table;
mutable SearchEngineData heaps;
mutable routing_algorithms::ManyToManyRouting<datafacade::BaseDataFacade> distance_table;
const int max_locations_distance_table;
};
}
}
+6 -6
View File
@@ -29,14 +29,14 @@ namespace plugins
class TripPlugin final : public BasePlugin
{
private:
SearchEngineData heaps;
routing_algorithms::ShortestPathRouting<datafacade::BaseDataFacade> shortest_path;
routing_algorithms::ManyToManyRouting<datafacade::BaseDataFacade> duration_table;
int max_locations_trip;
mutable SearchEngineData heaps;
mutable routing_algorithms::ShortestPathRouting<datafacade::BaseDataFacade> shortest_path;
mutable routing_algorithms::ManyToManyRouting<datafacade::BaseDataFacade> duration_table;
const int max_locations_trip;
InternalRouteResult ComputeRoute(const datafacade::BaseDataFacade &facade,
const std::vector<PhantomNode> &phantom_node_list,
const std::vector<NodeID> &trip);
const std::vector<NodeID> &trip) const;
public:
explicit TripPlugin(const int max_locations_trip_)
@@ -46,7 +46,7 @@ class TripPlugin final : public BasePlugin
Status HandleRequest(const std::shared_ptr<datafacade::BaseDataFacade> facade,
const api::TripParameters &parameters,
util::json::Object &json_result);
util::json::Object &json_result) const;
};
}
}
+6 -6
View File
@@ -28,18 +28,18 @@ namespace plugins
class ViaRoutePlugin final : public BasePlugin
{
private:
SearchEngineData heaps;
routing_algorithms::ShortestPathRouting<datafacade::BaseDataFacade> shortest_path;
routing_algorithms::AlternativeRouting<datafacade::BaseDataFacade> alternative_path;
routing_algorithms::DirectShortestPathRouting<datafacade::BaseDataFacade> direct_shortest_path;
int max_locations_viaroute;
mutable SearchEngineData heaps;
mutable routing_algorithms::ShortestPathRouting<datafacade::BaseDataFacade> shortest_path;
mutable routing_algorithms::AlternativeRouting<datafacade::BaseDataFacade> alternative_path;
mutable routing_algorithms::DirectShortestPathRouting<datafacade::BaseDataFacade> direct_shortest_path;
const int max_locations_viaroute;
public:
explicit ViaRoutePlugin(int max_locations_viaroute);
Status HandleRequest(const std::shared_ptr<datafacade::BaseDataFacade> facade,
const api::RouteParameters &route_parameters,
util::json::Object &json_result);
util::json::Object &json_result) const;
};
}
}