v8  4.6.85(node5.12.0)
V8 is Google's open source JavaScript engine
GlobalValueMap< K, V, Traits > Class Template Reference

#include <v8-util.h>

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

Public Types

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

Public Member Functions

 GlobalValueMap (Isolate *isolate)
 
Global< V > Set (const K &key, Local< V > value)
 
Global< V > Set (const K &key, Global< V > value)
 
Global< V > SetUnique (const K &key, Global< V > *persistent)
 
Global< V > Set (const K &key, Global< V > value, PersistentValueReference *reference)
 
- Public Member Functions inherited from PersistentValueMapBase< K, V, Traits >
IsolateGetIsolate ()
 
size_t Size ()
 
bool IsWeak ()
 
Local< V > Get (const K &key)
 
bool Contains (const K &key)
 
bool SetReturnValue (const K &key, ReturnValue< Value > returnValue)
 
void SetReference (const K &key, const Persistent< Object > &parent)
 
Global< V > Remove (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 ()
 
Isolateisolate ()
 
Traits::Impl * impl ()
 
void RemoveWeak (const K &key)
 
- Static Protected Member Functions inherited from PersistentValueMapBase< K, V, Traits >
static V * FromVal (PersistentContainerValue v)
 
static PersistentContainerValue ClearAndLeak (Global< V > *persistent)
 
static PersistentContainerValue Leak (Global< V > *persistent)
 
static Global< V > Release (PersistentContainerValue v)
 

Detailed Description

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

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

Member Typedef Documentation

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

Constructor & Destructor Documentation

GlobalValueMap ( Isolate isolate)
inlineexplicit

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

Member Function Documentation

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 433 of file v8-util.h.

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

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

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

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

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

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 469 of file v8-util.h.

References GlobalValueMap< K, V, Traits >::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 449 of file v8-util.h.

References v8::kNotWeak.

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


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