mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
736 B
27 lines
736 B
8 years ago
|
#ifndef TEST_ADDONS_NAPI_7_FACTORY_WRAP_MYOBJECT_H_
|
||
|
#define TEST_ADDONS_NAPI_7_FACTORY_WRAP_MYOBJECT_H_
|
||
|
|
||
|
#include <node_api.h>
|
||
|
|
||
|
class MyObject {
|
||
|
public:
|
||
|
static napi_status Init(napi_env env);
|
||
|
static void Destructor(napi_env env, void* nativeObject, void* finalize_hint);
|
||
|
static napi_status NewInstance(napi_env env,
|
||
|
napi_value arg,
|
||
|
napi_value* instance);
|
||
|
|
||
|
private:
|
||
|
MyObject();
|
||
|
~MyObject();
|
||
|
|
||
|
static napi_ref constructor;
|
||
|
static void New(napi_env env, napi_callback_info info);
|
||
|
static void PlusOne(napi_env env, napi_callback_info info);
|
||
|
double counter_;
|
||
|
napi_env env_;
|
||
|
napi_ref wrapper_;
|
||
|
};
|
||
|
|
||
|
#endif // TEST_ADDONS_NAPI_7_FACTORY_WRAP_MYOBJECT_H_
|