Public メソッド | Static Public メソッド | フレンド

クラス テンプレート v8::Persistent< T >

#include <v8.h>

v8::Handle< T >を継承しています。

すべてのメンバ一覧

Public メソッド

 Persistent ()
template<class S >
 Persistent (Persistent< S > that)
template<class S >
 Persistent (S *that)
template<class S >
 Persistent (Handle< S > that)
void Dispose ()
void MakeWeak (void *parameters, WeakReferenceCallback callback)
void ClearWeak ()
bool IsNearDeath ()
bool IsWeak ()

Static Public メソッド

template<class S >
static Persistent< T > Cast (Persistent< S > that)
static Persistent< T > New (Handle< T > that)

フレンド

class ImplementationUtilities
class ObjectTemplate

説明

template<class T>
class v8::Persistent< T >

An object reference that is independent of any handle scope. Where a Local handle only lives as long as the HandleScope in which it was allocated, a Persistent handle remains valid until it is explicitly disposed.

A persistent handle contains a reference to a storage cell within the v8 engine which holds an object value and which is updated by the garbage collector whenever the object is moved. A new storage cell can be created using Persistent::New and existing handles can be disposed using Persistent::Dispose. Since persistent handles are passed by value you may have many persistent handle objects that point to the same storage cell. For instance, if you pass a persistent handle as an argument to a function you will not get two different storage cells but rather two references to the same storage cell.

v8.h298 行で定義されています。


コンストラクタとデストラクタ

template<class T >
v8::Persistent< T >::Persistent (  ) 

Creates an empty persistent handle that doesn't point to any storage cell.

v8.h2307 行で定義されています。

template<class T>
template<class S >
v8::Persistent< T >::Persistent ( Persistent< S >  that  )  [inline]

Creates a persistent handle for the same storage cell as the specified handle. This constructor allows you to pass persistent handles as arguments by value and to assign between persistent handles. However, attempting to assign between incompatible persistent handles, for instance from a Persistent<String> to a Persistent<Number> will cause a compiletime error. Assigning between compatible persistent handles, for instance assigning a Persistent<String> to a variable declared as Persistent<Value>, is allowed as String is a subclass of Value.

This check fails when trying to convert between incompatible handles. For example, converting from a Handle<String> to a Handle<Number>.

v8.h318 行で定義されています。

template<class T>
template<class S >
v8::Persistent< T >::Persistent ( S *  that  )  [inline]

v8.h328 行で定義されています。

template<class T>
template<class S >
v8::Persistent< T >::Persistent ( Handle< S >  that  )  [inline, explicit]

"Casts" a plain handle which is known to be a persistent handle to a persistent handle.

v8.h334 行で定義されています。


関数

template<class T>
template<class S >
static Persistent<T> v8::Persistent< T >::Cast ( Persistent< S >  that  )  [inline, static]

v8.h337 行で定義されています。

template<class T >
void v8::Persistent< T >::ClearWeak (  ) 

Clears the weak reference to this object.

v8.h2315 行で定義されています。

template<class T >
void v8::Persistent< T >::Dispose (  ) 

Releases the storage cell referenced by this persistent handle. Does not remove the reference to the cell from any handles. This handle's reference, and any any other references to the storage cell remain and IsEmpty will still return false.

v8.h2300 行で定義されています。

参照先 v8::V8::DisposeGlobal(), と v8::Handle< T >::IsEmpty().

参照元 v8::ReadLineEditor::CompletionGenerator(), v8::DisposeExternalAsciiString(), と v8::DisposeExternalString().

template<class T >
bool v8::Persistent< T >::IsNearDeath (  ) 

Checks if the handle holds the only reference to an object.

v8.h2286 行で定義されています。

参照先 v8::Handle< T >::IsEmpty(), と v8::V8::IsGlobalNearDeath().

template<class T >
bool v8::Persistent< T >::IsWeak (  ) 

Returns true if the handle's reference is weak.

v8.h2293 行で定義されています。

参照先 v8::Handle< T >::IsEmpty(), と v8::V8::IsGlobalWeak().

template<class T >
void v8::Persistent< T >::MakeWeak ( void *  parameters,
WeakReferenceCallback  callback 
)

Make the reference to this object weak. When only weak handles refer to the object, the garbage collector will perform a callback to the given V8::WeakReferenceCallback function, passing it the object reference and the given parameters.

v8.h2310 行で定義されています。

template<class T>
Persistent< T > v8::Persistent< T >::New ( Handle< T >  that  )  [static]

Creates a new persistent handle for an existing local or persistent handle.

v8.h2278 行で定義されています。

参照先 v8::V8::GlobalizeReference(), v8::Handle< T >::IsEmpty(), と T.


フレンドと関連する関数

template<class T>
friend class ImplementationUtilities [friend]

v8.h378 行で定義されています。

template<class T>
friend class ObjectTemplate [friend]

v8.h379 行で定義されています。


このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義