2015-11-10 18:54:11 -05:00
|
|
|
#ifndef VIA_ROUTE_HPP
|
|
|
|
#define VIA_ROUTE_HPP
|
|
|
|
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "engine/api/route_api.hpp"
|
2016-01-28 10:28:44 -05:00
|
|
|
#include "engine/datafacade/datafacade_base.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "engine/plugins/plugin_base.hpp"
|
2015-11-10 18:54:11 -05:00
|
|
|
|
2016-01-28 10:28:44 -05:00
|
|
|
#include "engine/routing_algorithms/alternative_path.hpp"
|
|
|
|
#include "engine/routing_algorithms/direct_shortest_path.hpp"
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "engine/routing_algorithms/shortest_path.hpp"
|
|
|
|
#include "engine/search_engine_data.hpp"
|
2016-01-28 10:28:44 -05:00
|
|
|
#include "util/json_container.hpp"
|
2015-11-10 18:54:11 -05:00
|
|
|
|
|
|
|
#include <cstdlib>
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace engine
|
|
|
|
{
|
|
|
|
namespace plugins
|
|
|
|
{
|
|
|
|
|
2016-01-28 10:28:44 -05:00
|
|
|
class ViaRoutePlugin final : public BasePlugin
|
2015-11-10 18:54:11 -05:00
|
|
|
{
|
|
|
|
private:
|
2016-10-14 09:55:21 -04:00
|
|
|
mutable SearchEngineData heaps;
|
2017-01-05 06:18:45 -05:00
|
|
|
mutable routing_algorithms::ShortestPathRouting shortest_path;
|
|
|
|
mutable routing_algorithms::AlternativeRouting alternative_path;
|
|
|
|
mutable routing_algorithms::DirectShortestPathRouting direct_shortest_path;
|
2016-10-14 09:55:21 -04:00
|
|
|
const int max_locations_viaroute;
|
2015-11-10 18:54:11 -05:00
|
|
|
|
|
|
|
public:
|
2016-10-05 19:05:03 -04:00
|
|
|
explicit ViaRoutePlugin(int max_locations_viaroute);
|
2015-11-10 18:54:11 -05:00
|
|
|
|
2017-01-12 16:54:30 -05:00
|
|
|
Status HandleRequest(const std::shared_ptr<const datafacade::BaseDataFacade> facade,
|
2016-10-05 19:05:03 -04:00
|
|
|
const api::RouteParameters &route_parameters,
|
2016-10-14 09:55:21 -04:00
|
|
|
util::json::Object &json_result) const;
|
2015-11-10 18:54:11 -05:00
|
|
|
};
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-10 18:54:11 -05:00
|
|
|
#endif // VIA_ROUTE_HPP
|