v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::Global< T > Class Template Reference

#include <v8-persistent-handle.h>

Inheritance diagram for v8::Global< T >:
Collaboration diagram for v8::Global< T >:

Public Types

using MoveOnlyTypeForCPP03 = void
 

Public Member Functions

V8_INLINE Global ()=default
 
template<class S >
requires (std::is_base_of_v<T, S>)
V8_INLINE Global (Isolate *isolate, Local< S > that)
 
template<class S >
requires (std::is_base_of_v<T, S>)
V8_INLINE Global (Isolate *isolate, const PersistentBase< S > &that)
 
V8_INLINE Global (Global &&other)
 
V8_INLINE ~Global ()
 
template<class S >
V8_INLINE Globaloperator= (Global< S > &&rhs)
 
Global Pass ()
 
 Global (const Global &)=delete
 
void operator= (const Global &)=delete
 
template<class S >
Global< T > & operator= (Global< S > &&rhs)
 
- Public Member Functions inherited from v8::PersistentBase< T >
V8_INLINE void Reset ()
 
template<class S >
V8_INLINE void Reset (Isolate *isolate, const Local< S > &other)
 
template<class S >
V8_INLINE void Reset (Isolate *isolate, const PersistentBase< S > &other)
 
V8_INLINE Local< TGet (Isolate *isolate) const
 
template<class S >
V8_INLINE bool operator== (const PersistentBase< S > &that) const
 
template<class S >
V8_INLINE bool operator== (const Local< S > &that) const
 
template<class S >
V8_INLINE bool operator!= (const PersistentBase< S > &that) const
 
template<class S >
V8_INLINE bool operator!= (const Local< S > &that) const
 
template<typename P >
V8_INLINE void SetWeak (P *parameter, typename WeakCallbackInfo< P >::Callback callback, WeakCallbackType type)
 
V8_INLINE void SetWeak ()
 
template<typename P >
V8_INLINE PClearWeak ()
 
V8_INLINE void ClearWeak ()
 
V8_INLINE void AnnotateStrongRetainer (const char *label)
 
V8_INLINE bool IsWeak () const
 
V8_INLINE void SetWrapperClassId (uint16_t class_id)
 
V8_INLINE uint16_t WrapperClassId () const
 
 PersistentBase (const PersistentBase &other)=delete
 
void operator= (const PersistentBase &)=delete
 
template<class S >
void Reset (Isolate *isolate, const Local< S > &other)
 
template<class S >
void Reset (Isolate *isolate, const PersistentBase< S > &other)
 
template<typename P >
PClearWeak ()
 
- Public Member Functions inherited from v8::api_internal::IndirectHandleBase
V8_INLINE bool IsEmpty () const
 
V8_INLINE void Clear ()
 

Friends

template<class F >
class ReturnValue
 

Additional Inherited Members

- Protected Member Functions inherited from v8::api_internal::IndirectHandleBase
V8_INLINE IndirectHandleBase ()=default
 
V8_INLINE IndirectHandleBase (const IndirectHandleBase &other)=default
 
V8_INLINE IndirectHandleBaseoperator= (const IndirectHandleBase &that)=default
 
V8_INLINE IndirectHandleBase (internal::Address *location)
 
V8_INLINE internal::Address ptr () const
 
V8_INLINE internal::Address *const & slot () const
 
V8_INLINE internal::Address *& slot ()
 
template<typename T , bool check_null = false>
V8_INLINE Tvalue () const
 
V8_INLINE internal::ValueHelper::InternalRepresentationType repr () const
 

Detailed Description

template<class T>
class v8::Global< T >

A PersistentBase which has move semantics.

Note: Persistent class hierarchy is subject to future changes.

Definition at line 349 of file v8-persistent-handle.h.

Member Typedef Documentation

◆ MoveOnlyTypeForCPP03

template<class T >
using v8::Global< T >::MoveOnlyTypeForCPP03 = void

Definition at line 399 of file v8-persistent-handle.h.

Constructor & Destructor Documentation

◆ Global() [1/5]

template<class T >
V8_INLINE v8::Global< T >::Global ( )
default

A Global with no storage cell.

◆ Global() [2/5]

template<class T >
template<class S >
requires (std::is_base_of_v<T, S>)
V8_INLINE v8::Global< T >::Global ( Isolate * isolate,
Local< S > that )
inline

Construct a Global from a Local with automatic up casting. When the Local is non-empty, a new storage cell is created pointing to the same object, and no flags are set.

Definition at line 363 of file v8-persistent-handle.h.

◆ Global() [3/5]

template<class T >
template<class S >
requires (std::is_base_of_v<T, S>)
V8_INLINE v8::Global< T >::Global ( Isolate * isolate,
const PersistentBase< S > & that )
inline

Construct a Global from a PersistentBase with automatic up casting. 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 374 of file v8-persistent-handle.h.

◆ Global() [4/5]

template<class T >
v8::Global< T >::Global ( Global< T > && other)

Move constructor.

Definition at line 532 of file v8-persistent-handle.h.

◆ ~Global()

template<class T >
V8_INLINE v8::Global< T >::~Global ( )
inline

Definition at line 383 of file v8-persistent-handle.h.

Here is the call graph for this function:

◆ Global() [5/5]

template<class T >
v8::Global< T >::Global ( const Global< T > & )
delete

Member Function Documentation

◆ operator=() [1/3]

template<class T >
void v8::Global< T >::operator= ( const Global< T > & )
delete

◆ operator=() [2/3]

template<class T >
template<class S >
V8_INLINE Global & v8::Global< T >::operator= ( Global< S > && rhs)

Move via assignment.

◆ operator=() [3/3]

template<class T >
template<class S >
Global< T > & v8::Global< T >::operator= ( Global< S > && rhs)

Definition at line 541 of file v8-persistent-handle.h.

Here is the call graph for this function:

◆ Pass()

template<class T >
Global v8::Global< T >::Pass ( )
inline

Pass allows returning uniques from functions, etc.

Definition at line 394 of file v8-persistent-handle.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ ReturnValue

template<class T >
template<class F >
friend class ReturnValue
friend

Definition at line 406 of file v8-persistent-handle.h.


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