Foxit PDF RDK

Public Member Functions | List of all members
NativeObjectWrapper Class Reference
Inheritance diagram for NativeObjectWrapper:

## Public Member Functions
| constructor (r)
| GetPointerAsNumber ()

## Detailed Description

@abstract @description Base class for N-API object wrappers with manual lifecycle control

Remarks
  This class provides the foundation for TypeScript objects that wrap C++ objects via Node-API, offering both automatic and manual resource management.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ constructor()

NativeObjectWrapper.constructor | ( | r |  | ) |

@constructor

Parameters

  {NativeObjectReference} | r - The native object reference to wrap

@description Creates a new wrapper instance around a native C++ object. The wrapper manages the object's lifecycle according to the ownership rules.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ GetPointerAsNumber()

NativeObjectWrapper.GetPointerAsNumber | ( |  | ) |

@method GetPointerAsNumber

Returns
  {number} The memory address of the wrapped C++ object as a numeric value

@description Retrieves the raw pointer to the underlying C++ object.

Warning
  This exposes direct memory access - use with extreme caution. The pointer should only be used for interop purposes and never modified directly from TypeScript.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.