osrm-backend/include/engine/osrm_impl.hpp

45 lines
1.1 KiB
C++
Raw Normal View History

2015-01-27 10:35:19 -05:00
#ifndef OSRM_IMPL_HPP
#define OSRM_IMPL_HPP
2013-12-13 12:32:24 -05:00
class BasePlugin;
struct RouteParameters;
2016-01-02 11:13:44 -05:00
#include "contractor/query_edge.hpp"
2013-12-13 12:32:24 -05:00
2016-01-02 11:13:44 -05:00
#include "osrm/json_container.hpp"
#include "osrm/libosrm_config.hpp"
#include "osrm/osrm.hpp"
#include <memory>
2014-05-09 12:40:07 -04:00
#include <unordered_map>
#include <string>
struct SharedBarriers;
template <class EdgeDataT> class BaseDataFacade;
2015-12-15 13:25:26 -05:00
class OSRM::OSRM_impl final
{
private:
2015-12-14 16:00:20 -05:00
using PluginMap = std::unordered_map<std::string, std::unique_ptr<BasePlugin>>;
public:
2015-12-15 13:25:26 -05:00
OSRM_impl(LibOSRMConfig &lib_config);
OSRM_impl(const OSRM_impl &) = delete;
2015-12-14 16:00:20 -05:00
int RunQuery(const RouteParameters &route_parameters, osrm::json::Object &json_result);
2013-12-13 12:32:24 -05:00
private:
void RegisterPlugin(BasePlugin *plugin);
2013-12-13 12:32:24 -05:00
PluginMap plugin_map;
// will only be initialized if shared memory is used
std::unique_ptr<SharedBarriers> barrier;
// base class pointer to the objects
BaseDataFacade<QueryEdge::EdgeData> *query_data_facade;
// decrease number of concurrent queries
void decrease_concurrent_query_count();
// increase number of concurrent queries
void increase_concurrent_query_count();
2013-12-13 12:32:24 -05:00
};
2015-01-27 10:35:19 -05:00
#endif // OSRM_IMPL_HPP