Lines Matching refs:MyObject
801 MyObject::Init(exports);
821 class MyObject : public node::ObjectWrap {
826 explicit MyObject(double value = 0);
827 ~MyObject();
862 MyObject::MyObject(double value) : value_(value) {
865 MyObject::~MyObject() {
868 void MyObject::Init(Local<Object> exports) {
873 addon_data_tpl->SetInternalFieldCount(1); // 1 field for the MyObject::New()
879 tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject").ToLocalChecked());
888 isolate, "MyObject").ToLocalChecked(),
892 void MyObject::New(const FunctionCallbackInfo<Value>& args) {
897 // Invoked as constructor: `new MyObject(...)`
900 MyObject* obj = new MyObject(value);
904 // Invoked as plain function `MyObject(...)`, turn into construct call.
915 void MyObject::PlusOne(const FunctionCallbackInfo<Value>& args) {
918 MyObject* obj = ObjectWrap::Unwrap<MyObject>(args.Holder());
950 const obj = new addon.MyObject(10);
994 MyObject::NewInstance(args);
998 MyObject::Init(exports->GetIsolate());
1022 class MyObject : public node::ObjectWrap {
1028 explicit MyObject(double value = 0);
1029 ~MyObject();
1066 Global<Function> MyObject::constructor;
1068 MyObject::MyObject(double value) : value_(value) {
1071 MyObject::~MyObject() {
1074 void MyObject::Init(Isolate* isolate) {
1077 tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject").ToLocalChecked());
1091 void MyObject::New(const FunctionCallbackInfo<Value>& args) {
1096 // Invoked as constructor: `new MyObject(...)`
1099 MyObject* obj = new MyObject(value);
1103 // Invoked as plain function `MyObject(...)`, turn into construct call.
1113 void MyObject::NewInstance(const FunctionCallbackInfo<Value>& args) {
1126 void MyObject::PlusOne(const FunctionCallbackInfo<Value>& args) {
1129 MyObject* obj = ObjectWrap::Unwrap<MyObject>(args.Holder());
1183 that can take two `MyObject` objects as input arguments:
1203 MyObject::NewInstance(args);
1210 MyObject* obj1 = node::ObjectWrap::Unwrap<MyObject>(
1212 MyObject* obj2 = node::ObjectWrap::Unwrap<MyObject>(
1220 MyObject::Init(exports->GetIsolate());
1244 class MyObject : public node::ObjectWrap {
1251 explicit MyObject(double value = 0);
1252 ~MyObject();
1287 Global<Function> MyObject::constructor;
1289 MyObject::MyObject(double value) : value_(value) {
1292 MyObject::~MyObject() {
1295 void MyObject::Init(Isolate* isolate) {
1298 tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject").ToLocalChecked());
1309 void MyObject::New(const FunctionCallbackInfo<Value>& args) {
1314 // Invoked as constructor: `new MyObject(...)`
1317 MyObject* obj = new MyObject(value);
1321 // Invoked as plain function `MyObject(...)`, turn into construct call.
1331 void MyObject::NewInstance(const FunctionCallbackInfo<Value>& args) {