2015-01-27 11:44:46 -05:00
|
|
|
#ifndef NEAREST_HPP
|
|
|
|
#define NEAREST_HPP
|
2011-03-29 11:02:07 -04:00
|
|
|
|
2016-02-17 16:49:44 -05:00
|
|
|
#include "engine/api/nearest_parameters.hpp"
|
2017-01-09 15:40:33 -05:00
|
|
|
#include "engine/datafacade/contiguous_internalmem_datafacade.hpp"
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "engine/plugins/plugin_base.hpp"
|
2017-01-09 15:40:33 -05:00
|
|
|
#include "engine/routing_algorithms.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "osrm/json_container.hpp"
|
2014-11-24 11:57:01 -05:00
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace engine
|
|
|
|
{
|
|
|
|
namespace plugins
|
|
|
|
{
|
|
|
|
|
2016-02-17 15:56:27 -05:00
|
|
|
class NearestPlugin final : public BasePlugin
|
2014-05-02 12:06:31 -04:00
|
|
|
{
|
|
|
|
public:
|
2016-10-05 19:05:03 -04:00
|
|
|
explicit NearestPlugin(const int max_results);
|
2012-05-03 17:48:20 -04:00
|
|
|
|
2017-01-09 15:40:33 -05:00
|
|
|
Status HandleRequest(const datafacade::ContiguousInternalMemoryDataFacadeBase &facade,
|
|
|
|
const RoutingAlgorithmsInterface &algorithms,
|
2016-10-05 19:05:03 -04:00
|
|
|
const api::NearestParameters ¶ms,
|
|
|
|
util::json::Object &result) const;
|
2016-09-12 05:47:22 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
const int max_results;
|
2011-03-29 11:02:07 -04:00
|
|
|
};
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-27 11:44:46 -05:00
|
|
|
#endif /* NEAREST_HPP */
|