2017-03-01 12:27:57 -05:00
|
|
|
#ifndef OSRM_BINDINGS_NODE_HPP
|
|
|
|
#define OSRM_BINDINGS_NODE_HPP
|
|
|
|
|
|
|
|
#include "osrm/osrm_fwd.hpp"
|
|
|
|
|
2022-11-16 09:44:36 -05:00
|
|
|
#include <napi.h>
|
2017-03-01 12:27:57 -05:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace node_osrm
|
|
|
|
{
|
|
|
|
|
2022-11-16 09:44:36 -05:00
|
|
|
class Engine final : public Napi::ObjectWrap<Engine>
|
2017-03-01 12:27:57 -05:00
|
|
|
{
|
2022-11-16 09:44:36 -05:00
|
|
|
public:
|
|
|
|
static Napi::Object Init(Napi::Env env, Napi::Object exports);
|
|
|
|
Engine(const Napi::CallbackInfo &info);
|
2017-03-01 12:27:57 -05:00
|
|
|
|
|
|
|
std::shared_ptr<osrm::OSRM> this_;
|
2022-11-16 09:44:36 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
Napi::Value route(const Napi::CallbackInfo &info);
|
|
|
|
Napi::Value nearest(const Napi::CallbackInfo &info);
|
|
|
|
Napi::Value table(const Napi::CallbackInfo &info);
|
|
|
|
Napi::Value tile(const Napi::CallbackInfo &info);
|
|
|
|
Napi::Value match(const Napi::CallbackInfo &info);
|
|
|
|
Napi::Value trip(const Napi::CallbackInfo &info);
|
2017-03-01 12:27:57 -05:00
|
|
|
};
|
|
|
|
|
2020-05-12 09:09:40 -04:00
|
|
|
} // namespace node_osrm
|
2017-03-01 12:27:57 -05:00
|
|
|
|
|
|
|
#endif
|