te::v8::common::JsObject< T > Struct Template Reference

An auxiliary data structure for helping to control the garbage collection of wrapped C++ objects associated to JavaScript objects in Google's V8 engine. More...

#include <JsObject.h>

Public Member Functions

 JsObject (T *handle, bool isOwner)
 Initializes a new garbage collection helper object. More...
 
 ~JsObject ()
 The destructor will check if it is necessary to release the C++ object handle. More...
 

Public Attributes

T * m_handle
 A pointer to a C++ object. More...
 
bool m_isOwner
 If true it specifies that JsObject has the ownership of the C++ handle. More...
 

Detailed Description

template<class T>
struct te::v8::common::JsObject< T >

An auxiliary data structure for helping to control the garbage collection of wrapped C++ objects associated to JavaScript objects in Google's V8 engine.

Definition at line 43 of file JsObject.h.

Constructor & Destructor Documentation

template<class T>
te::v8::common::JsObject< T >::JsObject ( T *  handle,
bool  isOwner 
)
inline

Initializes a new garbage collection helper object.

Parameters
handleA pointer to a C++ object.
isOwnerIf true the JsObject will have the ownership of the pointer.

Definition at line 54 of file JsObject.h.

template<class T>
te::v8::common::JsObject< T >::~JsObject ( )
inline

The destructor will check if it is necessary to release the C++ object handle.

Definition at line 61 of file JsObject.h.

References te::v8::common::JsObject< T >::m_handle.

Member Data Documentation

template<class T>
T* te::v8::common::JsObject< T >::m_handle

A pointer to a C++ object.

Definition at line 45 of file JsObject.h.

Referenced by te::v8::common::Unwrap(), te::v8::common::UnwrapAndLooseOwnership(), and te::v8::common::JsObject< T >::~JsObject().

template<class T>
bool te::v8::common::JsObject< T >::m_isOwner

If true it specifies that JsObject has the ownership of the C++ handle.

Definition at line 46 of file JsObject.h.

Referenced by te::v8::common::LooseOwnership(), and te::v8::common::UnwrapAndLooseOwnership().


The documentation for this struct was generated from the following file: