-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbinding.cpp
More file actions
23 lines (20 loc) · 835 Bytes
/
binding.cpp
File metadata and controls
23 lines (20 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "containers.hpp"
#include "enums.hpp"
#include "pointers.hpp"
#include "primitives.hpp"
#include "strings.hpp"
#include "structs.hpp"
#include <napi_bind.hpp>
#include <node_api.h>
using napi_bind::ok;
static napi_value Init(napi_env env, napi_value exports)
{
ok(env, napi_set_named_property(env, exports, "containers", create_containers(env)));
ok(env, napi_set_named_property(env, exports, "enums", create_enums(env)));
ok(env, napi_set_named_property(env, exports, "pointers", create_pointers(env)));
ok(env, napi_set_named_property(env, exports, "primitives", create_primitives(env)));
ok(env, napi_set_named_property(env, exports, "strings", create_strings(env)));
ok(env, napi_set_named_property(env, exports, "structs", create_structs(env)));
return exports;
}
NAPI_MODULE(NODE_GYP_MODULE_NAME, Init)