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

#include <v8-util.h>

Inheritance diagram for v8::GlobalValueMap< K, V, Traits >:
Collaboration diagram for v8::GlobalValueMap< K, V, Traits >:

Public Types

typedef PersistentValueMapBase< K, V, Traits >::PersistentValueReference PersistentValueReference
 

Public Member Functions

 GlobalValueMap (Isolate *isolate)
 
 GlobalValueMap (Isolate *isolate, const char *label)
 
Global< VSet (const K &key, Local< V > value)
 
Global< VSet (const K &key, Global< V > value)
 
Global< VSetUnique (const K &key, Global< V > *persistent)
 
Global< VSet (const K &key, Global< V > value, PersistentValueReference *reference)
 
- Public Member Functions inherited from v8::PersistentValueMapBase< K, V, Traits >
IsolateGetIsolate ()
 
size_t Size ()
 
bool IsWeak ()
 
Local< VGet (const K &key)
 
bool Contains (const K &key)
 
bool SetReturnValue (const K &key, ReturnValue< Value > returnValue)
 
Global< VRemove (const K &key)
 
void Clear ()
 
PersistentValueReference GetReference (const K &key)
 

Static Private Member Functions

static void OnWeakCallback (const WeakCallbackInfo< typename Traits::WeakCallbackDataType > &data)
 
static void SecondWeakCallback (const WeakCallbackInfo< typename Traits::WeakCallbackDataType > &data)
 

Additional Inherited Members

- Protected Member Functions inherited from v8::PersistentValueMapBase< K, V, Traits >
 PersistentValueMapBase (Isolate *isolate)
 
 PersistentValueMapBase (Isolate *isolate, const char *label)
 
 ~PersistentValueMapBase ()
 
Isolateisolate ()
 
Traits::Impl * impl ()
 
void RemoveWeak (const K &key)
 
void AnnotateStrongRetainer (Global< V > *persistent)
 
- Static Protected Member Functions inherited from v8::PersistentValueMapBase< K, V, Traits >
static VFromVal (PersistentContainerValue v)
 
static PersistentContainerValue ClearAndLeak (Global< V > *persistent)
 
static PersistentContainerValue Leak (Global< V > *persistent)
 
static Global< VRelease (PersistentContainerValue v)
 

Detailed Description

template<typename K, typename V, typename Traits>
class v8::GlobalValueMap< K, V, Traits >

Definition at line 437 of file v8-util.h.

Member Typedef Documentation

◆ PersistentValueReference

template<typename K , typename V , typename Traits >
PersistentValueMapBase<K,V,Traits>::PersistentValueReference v8::GlobalValueMap< K, V, Traits >::PersistentValueReference

Definition at line 446 of file v8-util.h.

Constructor & Destructor Documentation

◆ GlobalValueMap() [1/2]

template<typename K , typename V , typename Traits >
v8::GlobalValueMap< K, V, Traits >::GlobalValueMap ( Isolate * isolate)
inlineexplicit

Definition at line 439 of file v8-util.h.

◆ GlobalValueMap() [2/2]

template<typename K , typename V , typename Traits >
v8::GlobalValueMap< K, V, Traits >::GlobalValueMap ( Isolate * isolate,
const char * label )
inline

Definition at line 441 of file v8-util.h.

Member Function Documentation

◆ OnWeakCallback()

template<typename K , typename V , typename Traits >
static void v8::GlobalValueMap< K, V, Traits >::OnWeakCallback ( const WeakCallbackInfo< typename Traits::WeakCallbackDataType > & data)
inlinestaticprivate

Definition at line 498 of file v8-util.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SecondWeakCallback()

template<typename K , typename V , typename Traits >
static void v8::GlobalValueMap< K, V, Traits >::SecondWeakCallback ( const WeakCallbackInfo< typename Traits::WeakCallbackDataType > & data)
inlinestaticprivate

Definition at line 509 of file v8-util.h.

Here is the caller graph for this function:

◆ Set() [1/3]

template<typename K , typename V , typename Traits >
Global< V > v8::GlobalValueMap< K, V, Traits >::Set ( const K & key,
Global< V > value )
inline

Put value into map, like Set(const K&, Local<V>).

Definition at line 461 of file v8-util.h.

Here is the call graph for this function:

◆ Set() [2/3]

template<typename K , typename V , typename Traits >
Global< V > v8::GlobalValueMap< K, V, Traits >::Set ( const K & key,
Global< V > value,
PersistentValueReference * reference )
inline

Put a value into the map and update the reference. Restrictions of GetReference apply here as well.

Definition at line 491 of file v8-util.h.

Here is the call graph for this function:

◆ Set() [3/3]

template<typename K , typename V , typename Traits >
Global< V > v8::GlobalValueMap< K, V, Traits >::Set ( const K & key,
Local< V > value )
inline

Put value into map. Depending on Traits::kIsWeak, the value will be held by the map strongly or weakly. Returns old value as Global.

Definition at line 453 of file v8-util.h.

Here is the call graph for this function:

◆ SetUnique()

template<typename K , typename V , typename Traits >
Global< V > v8::GlobalValueMap< K, V, Traits >::SetUnique ( const K & key,
Global< V > * persistent )
inline

Put the value into the map, and set the 'weak' callback when demanded by the Traits class.

Definition at line 469 of file v8-util.h.

Here is the call graph for this function:
Here is the caller graph for this function:

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