-
-
Notifications
You must be signed in to change notification settings - Fork 600
Expand file tree
/
Copy pathmyobject.h
More file actions
28 lines (22 loc) · 915 Bytes
/
myobject.h
File metadata and controls
28 lines (22 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef MYOBJECT_H
#define MYOBJECT_H
#include <nan.h>
class MyObject : public Nan::ObjectWrap {
public:
static void Init(v8::Local<v8::Object> exports);
private:
explicit MyObject(double value = 0);
~MyObject();
static void New(const Nan::FunctionCallbackInfo<v8::Value>& info);
static void GetValueAcc(v8::Local<v8::String> property,
const Nan::PropertyCallbackInfo<v8::Value>& info);
static void SetValueAcc(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const Nan::PropertyCallbackInfo<void>& info);
static void GetValue(const Nan::FunctionCallbackInfo<v8::Value>& info);
static void PlusOne(const Nan::FunctionCallbackInfo<v8::Value>& info);
static void Multiply(const Nan::FunctionCallbackInfo<v8::Value>& info);
static Nan::Persistent<v8::Function> constructor;
double value_;
};
#endif