Add viaroute suport for new API
This commit is contained in:
@@ -28,13 +28,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef OSRM_HPP
|
||||
#define OSRM_HPP
|
||||
|
||||
#include "osrm/status.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
|
||||
struct LibOSRMConfig;
|
||||
|
||||
namespace util
|
||||
{
|
||||
namespace json
|
||||
@@ -47,11 +46,14 @@ namespace engine
|
||||
{
|
||||
class Engine;
|
||||
struct EngineConfig;
|
||||
namespace api
|
||||
{
|
||||
struct RouteParameters;
|
||||
}
|
||||
}
|
||||
|
||||
using engine::EngineConfig;
|
||||
using engine::RouteParameters;
|
||||
using engine::api::RouteParameters;
|
||||
namespace json = util::json;
|
||||
|
||||
class OSRM
|
||||
@@ -61,8 +63,8 @@ class OSRM
|
||||
|
||||
public:
|
||||
OSRM(EngineConfig &lib_config);
|
||||
~OSRM(); // needed because we need to define it with the implementation of OSRM_impl
|
||||
int RunQuery(const RouteParameters &route_parameters, json::Object &json_result);
|
||||
~OSRM(); // needed for unique_ptr + impl abstraction
|
||||
Status Route(const RouteParameters &route_parameters, json::Object &json_result);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#ifndef GLOBAL_ROUTE_PARAMETERS_HPP
|
||||
#define GLOBAL_ROUTE_PARAMETERS_HPP
|
||||
|
||||
#include "engine/route_parameters.hpp"
|
||||
#include "engine/api/route_parameters.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
using engine::RouteParameters;
|
||||
using engine::api::RouteParameters;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef OSRM_STATUS_HPP
|
||||
#define OSRM_STATUS_HPP
|
||||
|
||||
#include "engine/status.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
using engine::Status;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user