Enable all plugins with aStatus::Error return code fallback for not implemented ones

This commit is contained in:
Daniel J. Hofmann
2016-02-18 13:15:07 -08:00
committed by Patrick Niklaus
parent 26dd3c8cd7
commit 891ac48d1c
4 changed files with 55 additions and 37 deletions
+6 -6
View File
@@ -29,16 +29,16 @@ namespace api
struct RouteParameters;
struct TableParameters;
struct NearestParameters;
// struct TripParameters;
// struct MatchParameters;
struct TripParameters;
struct MatchParameters;
}
namespace plugins
{
class ViaRoutePlugin;
class TablePlugin;
class NearestPlugin;
// class TripPlugin;
// class MatchPlugin;
class TripPlugin;
class MatchPlugin;
}
// End fwd decls
@@ -64,8 +64,8 @@ class Engine final
Status Route(const api::RouteParameters &parameters, util::json::Object &result);
Status Table(const api::TableParameters &parameters, util::json::Object &result);
Status Nearest(const api::NearestParameters &parameters, util::json::Object &result);
// Status Trip(const api::TripParameters &parameters, util::json::Object &result);
// Status Match(const api::MatchParameters &parameters, util::json::Object &result);
Status Trip(const api::TripParameters &parameters, util::json::Object &result);
Status Match(const api::MatchParameters &parameters, util::json::Object &result);
private:
std::unique_ptr<EngineLock> lock;
+12 -7
View File
@@ -47,27 +47,32 @@ struct Object;
namespace engine
{
class Engine;
struct EngineConfig;
namespace api
{
struct RouteParameters;
struct TableParameters;
struct NearestParameters;
// struct TripParameters;
// struct MatchParameters;
struct TripParameters;
struct MatchParameters;
}
}
// End fwd decls
using engine::EngineConfig;
using engine::api::RouteParameters;
using engine::api::TableParameters;
using engine::api::NearestParameters;
// using engine::api::TripParameters;
// using engine::api::MatchParameters;
using engine::api::TripParameters;
using engine::api::MatchParameters;
namespace json = util::json;
class OSRM
// OSRM API
class OSRM final
{
public:
explicit OSRM(EngineConfig &config);
@@ -79,8 +84,8 @@ class OSRM
Status Route(const RouteParameters &parameters, json::Object &result);
Status Table(const TableParameters &parameters, json::Object &result);
Status Nearest(const NearestParameters &parameters, json::Object &result);
// Status Trip(const TripParameters &parameters, json::Object &result);
// Status Match(const MatchParameters &parameters, json::Object &result);
Status Trip(const TripParameters &parameters, json::Object &result);
Status Match(const MatchParameters &parameters, json::Object &result);
private:
std::unique_ptr<engine::Engine> engine_;