te::common::Holder< T > Struct Template Reference

An auxiliary data structure for helping to control the garbage collection of C++ objects. More...

#include <Holder.h>

Inheritance diagram for te::common::Holder< T >:

Public Member Functions

T * get () const
 
 Holder (T *handle, bool isOwner)
 Initializes a new garbage collection helper object. More...
 
T & operator* () const
 
T * operator-> () const
 
 ~Holder ()
 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::common::Holder< T >

An auxiliary data structure for helping to control the garbage collection of C++ objects.

Definition at line 43 of file Holder.h.

Constructor & Destructor Documentation

template<class T>
te::common::Holder< T >::Holder ( 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 Holder.h.

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

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

Definition at line 61 of file Holder.h.

Member Function Documentation

template<class T>
T* te::common::Holder< T >::get ( ) const
inline

Definition at line 77 of file Holder.h.

template<class T>
T& te::common::Holder< T >::operator* ( ) const
inline

Definition at line 67 of file Holder.h.

template<class T>
T* te::common::Holder< T >::operator-> ( ) const
inline

Definition at line 72 of file Holder.h.

Member Data Documentation

template<class T>
bool te::common::Holder< T >::m_isOwner

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

Definition at line 46 of file Holder.h.


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