References: https://github.com/Project-OSRM/osrm-backend/issues/3619 https://github.com/Project-OSRM/osrm-backend/pull/3627#issuecomment-276288138
67 lines
2.2 KiB
C++
67 lines
2.2 KiB
C++
#ifndef ENGINE_HPP
|
|
#define ENGINE_HPP
|
|
|
|
#include "engine/api/match_parameters.hpp"
|
|
#include "engine/api/nearest_parameters.hpp"
|
|
#include "engine/api/route_parameters.hpp"
|
|
#include "engine/api/table_parameters.hpp"
|
|
#include "engine/api/tile_parameters.hpp"
|
|
#include "engine/api/trip_parameters.hpp"
|
|
#include "engine/data_watchdog.hpp"
|
|
#include "engine/datafacade/contiguous_block_allocator.hpp"
|
|
#include "engine/datafacade/datafacade_base.hpp"
|
|
#include "engine/engine_config.hpp"
|
|
#include "engine/plugins/match.hpp"
|
|
#include "engine/plugins/nearest.hpp"
|
|
#include "engine/plugins/table.hpp"
|
|
#include "engine/plugins/tile.hpp"
|
|
#include "engine/plugins/trip.hpp"
|
|
#include "engine/plugins/viaroute.hpp"
|
|
#include "engine/status.hpp"
|
|
#include "util/exception.hpp"
|
|
#include "util/exception_utils.hpp"
|
|
#include "util/json_container.hpp"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace osrm
|
|
{
|
|
namespace engine
|
|
{
|
|
|
|
class Engine final
|
|
{
|
|
public:
|
|
explicit Engine(const EngineConfig &config);
|
|
|
|
Engine(Engine &&) noexcept = delete;
|
|
Engine &operator=(Engine &&) noexcept = delete;
|
|
|
|
Engine(const Engine &) = delete;
|
|
Engine &operator=(const Engine &) = delete;
|
|
|
|
Status Route(const api::RouteParameters ¶meters, util::json::Object &result) const;
|
|
Status Table(const api::TableParameters ¶meters, util::json::Object &result) const;
|
|
Status Nearest(const api::NearestParameters ¶meters, util::json::Object &result) const;
|
|
Status Trip(const api::TripParameters ¶meters, util::json::Object &result) const;
|
|
Status Match(const api::MatchParameters ¶meters, util::json::Object &result) const;
|
|
Status Tile(const api::TileParameters ¶meters, std::string &result) const;
|
|
|
|
private:
|
|
const plugins::ViaRoutePlugin route_plugin;
|
|
const plugins::TablePlugin table_plugin;
|
|
const plugins::NearestPlugin nearest_plugin;
|
|
const plugins::TripPlugin trip_plugin;
|
|
const plugins::MatchPlugin match_plugin;
|
|
const plugins::TilePlugin tile_plugin;
|
|
|
|
// note in case of shared memory this will be empty, since the watchdog
|
|
// will provide us with the up-to-date facade
|
|
std::shared_ptr<const datafacade::BaseDataFacade> immutable_data_facade;
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif // OSRM_IMPL_HPP
|