MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / InstanceWrap

Class InstanceWrap

napi.h:2361–2482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2359
2360template <typename T>
2361class InstanceWrap {
2362 public:
2363 using InstanceVoidMethodCallback = void (T::*)(const CallbackInfo& info);
2364 using InstanceMethodCallback = Napi::Value (T::*)(const CallbackInfo& info);
2365 using InstanceGetterCallback = Napi::Value (T::*)(const CallbackInfo& info);
2366 using InstanceSetterCallback = void (T::*)(const CallbackInfo& info,
2367 const Napi::Value& value);
2368
2369 using PropertyDescriptor = ClassPropertyDescriptor<T>;
2370
2371 static PropertyDescriptor InstanceMethod(
2372 const char* utf8name,
2373 InstanceVoidMethodCallback method,
2374 napi_property_attributes attributes = napi_default,
2375 void* data = nullptr);
2376 static PropertyDescriptor InstanceMethod(
2377 const char* utf8name,
2378 InstanceMethodCallback method,
2379 napi_property_attributes attributes = napi_default,
2380 void* data = nullptr);
2381 static PropertyDescriptor InstanceMethod(
2382 Symbol name,
2383 InstanceVoidMethodCallback method,
2384 napi_property_attributes attributes = napi_default,
2385 void* data = nullptr);
2386 static PropertyDescriptor InstanceMethod(
2387 Symbol name,
2388 InstanceMethodCallback method,
2389 napi_property_attributes attributes = napi_default,
2390 void* data = nullptr);
2391 template <InstanceVoidMethodCallback method>
2392 static PropertyDescriptor InstanceMethod(
2393 const char* utf8name,
2394 napi_property_attributes attributes = napi_default,
2395 void* data = nullptr);
2396 template <InstanceMethodCallback method>
2397 static PropertyDescriptor InstanceMethod(
2398 const char* utf8name,
2399 napi_property_attributes attributes = napi_default,
2400 void* data = nullptr);
2401 template <InstanceVoidMethodCallback method>
2402 static PropertyDescriptor InstanceMethod(
2403 Symbol name,
2404 napi_property_attributes attributes = napi_default,
2405 void* data = nullptr);
2406 template <InstanceMethodCallback method>
2407 static PropertyDescriptor InstanceMethod(
2408 Symbol name,
2409 napi_property_attributes attributes = napi_default,
2410 void* data = nullptr);
2411 static PropertyDescriptor InstanceAccessor(
2412 const char* utf8name,
2413 InstanceGetterCallback getter,
2414 InstanceSetterCallback setter,
2415 napi_property_attributes attributes = napi_default,
2416 void* data = nullptr);
2417 static PropertyDescriptor InstanceAccessor(
2418 Symbol name,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected