v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Persistent< T, M > Class Template Reference

#include <v8.h>

Inheritance diagram for Persistent< T, M >:
Collaboration diagram for Persistent< T, M >:

Public Member Functions

V8_INLINE Persistent ()
 
template<class S >
V8_INLINE Persistent (Isolate *isolate, Handle< S > that)
 
template<class S , class M2 >
V8_INLINE Persistent (Isolate *isolate, const Persistent< S, M2 > &that)
 
V8_INLINE Persistent (const Persistent &that)
 
template<class S , class M2 >
V8_INLINE Persistent (const Persistent< S, M2 > &that)
 
V8_INLINE Persistentoperator= (const Persistent &that)
 
template<class S , class M2 >
V8_INLINE Persistentoperator= (const Persistent< S, M2 > &that)
 
V8_INLINE ~Persistent ()
 
template<class S >
V8_INLINE Persistent< S > & As ()
 
V8_INLINE TClearAndLeak ()
 
template<class S , class M2 >
void Copy (const Persistent< S, M2 > &that)
 
- Public Member Functions inherited from PersistentBase< T >
V8_INLINE void Reset ()
 
template<class S >
V8_INLINE void Reset (Isolate *isolate, const Handle< S > &other)
 
template<class S >
V8_INLINE void Reset (Isolate *isolate, const PersistentBase< S > &other)
 
V8_INLINE bool IsEmpty () const
 
template<class S >
V8_INLINE bool operator== (const PersistentBase< S > &that) const
 
template<class S >
V8_INLINE bool operator== (const Handle< S > &that) const
 
template<class S >
V8_INLINE bool operator!= (const PersistentBase< S > &that) const
 
template<class S >
V8_INLINE bool operator!= (const Handle< S > &that) const
 
template<typename P >
V8_INLINE void SetWeak (P *parameter, typename WeakCallbackData< T, P >::Callback callback)
 
template<typename S , typename P >
V8_INLINE void SetWeak (P *parameter, typename WeakCallbackData< S, P >::Callback callback)
 
template<typename P >
V8_INLINE P * ClearWeak ()
 
V8_INLINE void ClearWeak ()
 
V8_INLINE void MarkIndependent ()
 
V8_INLINE void MarkPartiallyDependent ()
 
V8_INLINE bool IsIndependent () const
 
V8_INLINE bool IsNearDeath () const
 
V8_INLINE bool IsWeak () const
 
V8_INLINE void SetWrapperClassId (uint16_t class_id)
 
V8_INLINE uint16_t WrapperClassId () const
 
template<class S >
void Reset (Isolate *isolate, const Handle< S > &other)
 
template<class S >
void Reset (Isolate *isolate, const PersistentBase< S > &other)
 
template<typename S , typename P >
void SetWeak (P *parameter, typename WeakCallbackData< S, P >::Callback callback)
 
template<typename P >
void SetWeak (P *parameter, typename WeakCallbackData< T, P >::Callback callback)
 

Static Public Member Functions

template<class S >
static V8_INLINE Persistent< T > & Cast (Persistent< S > &that)
 

Friends

class Isolate
 
class Utils
 
template<class F >
class Handle
 
template<class F >
class Local
 
template<class F1 , class F2 >
class Persistent
 
template<class F >
class ReturnValue
 

Detailed Description

template<class T, class M = NonCopyablePersistentTraits<T>>
class v8::Persistent< T, M >

A PersistentBase which allows copy and assignment.

Copy, assignment and destructor bevavior is controlled by the traits class M.

Note: Persistent class hierarchy is subject to future changes.

Definition at line 129 of file v8.h.

Constructor & Destructor Documentation

V8_INLINE Persistent ( )
inline

A Persistent with no storage cell.

Definition at line 652 of file v8.h.

V8_INLINE Persistent ( Isolate isolate,
Handle< S that 
)
inline

Construct a Persistent from a Handle. When the Handle is non-empty, a new storage cell is created pointing to the same object, and no flags are set.

Definition at line 658 of file v8.h.

V8_INLINE Persistent ( Isolate isolate,
const Persistent< S, M2 > &  that 
)
inline

Construct a Persistent from a Persistent. When the Persistent is non-empty, a new storage cell is created pointing to the same object, and no flags are set.

Definition at line 668 of file v8.h.

V8_INLINE Persistent ( const Persistent< T, M > &  that)
inline

The copy constructors and assignment operator create a Persistent exactly as the Persistent constructor, but the Copy function from the traits class is called, allowing the setting of flags based on the copied Persistent.

Definition at line 678 of file v8.h.

V8_INLINE Persistent ( const Persistent< S, M2 > &  that)
inline

Definition at line 682 of file v8.h.

V8_INLINE ~Persistent ( )
inline

The destructor will dispose the Persistent based on the kResetInDestructor flags in the traits class. Since not calling dispose can result in a memory leak, it is recommended to always set this flag.

Definition at line 699 of file v8.h.

Member Function Documentation

V8_INLINE Persistent<S>& As ( )
inline

Definition at line 715 of file v8.h.

static V8_INLINE Persistent<T>& Cast ( Persistent< S > &  that)
inlinestatic

Definition at line 705 of file v8.h.

Referenced by Persistent< Function >::As(), and THREADED_TEST().

T * ClearAndLeak ( )

Definition at line 5887 of file v8.h.

References NULL, and T.

void Copy ( const Persistent< S, M2 > &  that)

Definition at line 5768 of file v8.h.

References S, T, and TYPE_CHECK.

V8_INLINE Persistent& operator= ( const Persistent< T, M > &  that)
inline

Definition at line 685 of file v8.h.

V8_INLINE Persistent& operator= ( const Persistent< S, M2 > &  that)
inline

Definition at line 690 of file v8.h.

Friends And Related Function Documentation

friend class Handle
friend

Definition at line 734 of file v8.h.

friend class Isolate
friend

Definition at line 732 of file v8.h.

friend class Local
friend

Definition at line 735 of file v8.h.

friend class Persistent
friend

Definition at line 736 of file v8.h.

friend class ReturnValue
friend

Definition at line 737 of file v8.h.

friend class Utils
friend

Definition at line 733 of file v8.h.


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