nodenetcdf 4.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.clang-format +13 -0
- package/.github/workflows/nodejs.yml +97 -0
- package/LICENSE +13 -0
- package/README.md +330 -0
- package/binding.gyp +95 -0
- package/package.json +35 -0
- package/scripts/copy-deps.js +57 -0
- package/scripts/setup-vcpkg.js +93 -0
- package/scripts/verify-build-deps.js +61 -0
- package/src/Attribute.cpp +334 -0
- package/src/Attribute.h +46 -0
- package/src/Dimension.cpp +105 -0
- package/src/Dimension.h +40 -0
- package/src/File.cpp +170 -0
- package/src/File.h +42 -0
- package/src/Group.cpp +483 -0
- package/src/Group.h +49 -0
- package/src/Variable.cpp +1352 -0
- package/src/Variable.h +88 -0
- package/src/nodenetcdfjs.cpp +24 -0
- package/src/nodenetcdfjs.h +37 -0
- package/test/attribute.js +36 -0
- package/test/dimension.js +18 -0
- package/test/file.js +19 -0
- package/test/group.js +57 -0
- package/test/test_hgroups.nc +0 -0
- package/test/testrh.nc +0 -0
- package/test/variable.js +16 -0
package/src/Group.h
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#ifndef NODENETCDFJS_GROUP_H
|
|
2
|
+
#define NODENETCDFJS_GROUP_H
|
|
3
|
+
|
|
4
|
+
#include <node.h>
|
|
5
|
+
#include <node_object_wrap.h>
|
|
6
|
+
|
|
7
|
+
namespace nodenetcdfjs
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
class Variable;
|
|
11
|
+
|
|
12
|
+
class Group : public node::ObjectWrap
|
|
13
|
+
{
|
|
14
|
+
public:
|
|
15
|
+
explicit Group(int id) noexcept;
|
|
16
|
+
static void Init(v8::Local<v8::Object> exports);
|
|
17
|
+
|
|
18
|
+
[[nodiscard]] bool get_name(char *name) const noexcept;
|
|
19
|
+
|
|
20
|
+
private:
|
|
21
|
+
// Delete copy and move operations for safety
|
|
22
|
+
Group(const Group &) = delete;
|
|
23
|
+
Group &operator=(const Group &) = delete;
|
|
24
|
+
Group(Group &&) = delete;
|
|
25
|
+
Group &operator=(Group &&) = delete;
|
|
26
|
+
|
|
27
|
+
static v8::Persistent<v8::Function> constructor;
|
|
28
|
+
|
|
29
|
+
static void GetId(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
30
|
+
static void GetVariables(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
31
|
+
static void GetDimensions(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
32
|
+
static void GetUnlimited(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
33
|
+
static void GetAttributes(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
34
|
+
static void GetSubgroups(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
35
|
+
static void GetName(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
36
|
+
static void GetFullname(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
37
|
+
|
|
38
|
+
static void AddAttribute(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
39
|
+
static void AddDimension(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
40
|
+
static void AddSubgroup(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
41
|
+
static void AddVariable(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
42
|
+
static void Inspect(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
43
|
+
|
|
44
|
+
int id{-1};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
} // namespace nodenetcdfjs
|
|
48
|
+
|
|
49
|
+
#endif
|