osrm-backend/include/engine/plugins/table.hpp
Patrick Niklaus 1c2ead8fb8 Make DataFacade local to every request
This is the first step to having fine grained locking on data updates,
see issue #2570.
2016-10-06 12:56:38 +02:00

37 lines
826 B
C++

#ifndef TABLE_HPP
#define TABLE_HPP
#include "engine/plugins/plugin_base.hpp"
#include "engine/api/table_parameters.hpp"
#include "engine/routing_algorithms/many_to_many.hpp"
#include "engine/search_engine_data.hpp"
#include "util/json_container.hpp"
namespace osrm
{
namespace engine
{
namespace plugins
{
class TablePlugin final : public BasePlugin
{
public:
explicit TablePlugin(const int max_locations_distance_table);
Status HandleRequest(const std::shared_ptr<datafacade::BaseDataFacade> facade,
const api::TableParameters &params,
util::json::Object &result);
private:
SearchEngineData heaps;
routing_algorithms::ManyToManyRouting<datafacade::BaseDataFacade> distance_table;
int max_locations_distance_table;
};
}
}
}
#endif // TABLE_HPP