osrm-backend/include/engine/plugins/trip.hpp

51 lines
1.2 KiB
C++
Raw Normal View History

#ifndef TRIP_HPP
#define TRIP_HPP
2016-01-02 11:13:44 -05:00
#include "engine/plugins/plugin_base.hpp"
2016-02-22 15:15:02 -05:00
#include "engine/api/trip_parameters.hpp"
#include "engine/routing_algorithms.hpp"
2016-02-22 15:15:02 -05:00
#include "util/json_container.hpp"
2016-01-04 04:19:25 -05:00
#include <boost/assert.hpp>
#include <algorithm>
2016-05-27 15:05:04 -04:00
#include <cstdlib>
#include <iterator>
#include <memory>
#include <string>
#include <utility>
#include <vector>
2016-01-05 10:51:13 -05:00
namespace osrm
{
namespace engine
{
namespace plugins
{
2016-02-22 15:15:02 -05:00
class TripPlugin final : public BasePlugin
{
private:
const int max_locations_trip;
InternalRouteResult ComputeRoute(const RoutingAlgorithmsInterface &algorithms,
const std::vector<PhantomNode> &phantom_node_list,
const std::vector<NodeID> &trip,
const bool roundtrip) const;
2015-08-20 09:32:28 -04:00
2016-02-22 15:15:02 -05:00
public:
explicit TripPlugin(const int max_locations_trip_) : max_locations_trip(max_locations_trip_) {}
2016-02-22 15:15:02 -05:00
Status HandleRequest(const datafacade::ContiguousInternalMemoryDataFacadeBase &facade,
const RoutingAlgorithmsInterface &algorithms,
const api::TripParameters &parameters,
util::json::Object &json_result) const;
};
2016-01-05 10:51:13 -05:00
}
}
}
#endif // TRIP_HPP