v8  7.9.317 (node 13.2.0)
V8 is Google's open source JavaScript engine
PersistentValueMap< K, V, Traits > Class Template Reference

#include <v8-util.h>

Inheritance diagram for PersistentValueMap< K, V, Traits >:
Collaboration diagram for PersistentValueMap< K, V, Traits >:

Public Types

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

Public Member Functions

 PersistentValueMap (Isolate *isolate)
 
 PersistentValueMap (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 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)
 

Additional Inherited Members

- Protected Member Functions inherited from 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 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::PersistentValueMap< K, V, Traits >

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

Member Typedef Documentation

◆ PersistentValueReference

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

Constructor & Destructor Documentation

◆ PersistentValueMap() [1/2]

PersistentValueMap ( Isolate isolate)
inlineexplicit

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

◆ PersistentValueMap() [2/2]

PersistentValueMap ( Isolate isolate,
const char *  label 
)
inline

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

Member Function Documentation

◆ Set() [1/3]

Global<V> Set ( const K &  key,
Global< V value 
)
inline

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

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

References PersistentValueMap< K, V, Traits >::SetUnique().

◆ Set() [2/3]

Global<V> 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 402 of file v8-util.h.

References PersistentValueMap< K, V, Traits >::SetUnique().

◆ Set() [3/3]

Global<V> 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 364 of file v8-util.h.

References PersistentBase< T >::Global, and PersistentValueMap< K, V, Traits >::SetUnique().

◆ SetUnique()

Global<V> 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 380 of file v8-util.h.

References v8::kInternalFields, v8::kNotWeak, v8::kParameter, v8::kWeakWithInternalFields, and Local< T >::Local.

Referenced by PersistentValueMap< K, V, Traits >::Set().


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