#ifndef ENGINE_HPP #define ENGINE_HPP #include "engine/status.hpp" #include "storage/shared_barriers.hpp" #include "util/json_container.hpp" #include #include #include namespace osrm { namespace util { namespace json { struct Object; } } // Fwd decls namespace engine { struct EngineConfig; namespace api { struct RouteParameters; struct TableParameters; struct NearestParameters; struct TripParameters; struct MatchParameters; } namespace plugins { class ViaRoutePlugin; class TablePlugin; class NearestPlugin; class TripPlugin; class MatchPlugin; } // End fwd decls namespace datafacade { class BaseDataFacade; } class Engine final { public: // Needs to be public struct EngineLock; explicit Engine(EngineConfig &config); Engine(Engine &&) noexcept; Engine &operator=(Engine &&) noexcept; // Impl. in cpp since for unique_ptr of incomplete types ~Engine(); Status Route(const api::RouteParameters ¶meters, util::json::Object &result); Status Table(const api::TableParameters ¶meters, util::json::Object &result); Status Nearest(const api::NearestParameters ¶meters, util::json::Object &result); Status Trip(const api::TripParameters ¶meters, util::json::Object &result); Status Match(const api::MatchParameters ¶meters, util::json::Object &result); private: std::unique_ptr lock; std::unique_ptr route_plugin; std::unique_ptr table_plugin; std::unique_ptr nearest_plugin; // std::unique_ptr trip_plugin; std::unique_ptr match_plugin; std::unique_ptr query_data_facade; }; } } #endif // OSRM_IMPL_HPP