Public メソッド | Static Public メソッド | Private 変数

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

#include <v8.h>

v8::Local< T >, と v8::Persistent< T >に継承されています。

すべてのメンバ一覧

Public メソッド

 Handle ()
 Handle (T *val)
template<class S >
 Handle (Handle< S > that)
bool IsEmpty ()
T * operator-> ()
T * operator* ()
void Clear ()
template<class S >
bool operator== (Handle< S > that)
template<class S >
bool operator!= (Handle< S > that)

Static Public メソッド

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

Private 変数

T * val_

説明

template<class T>
class v8::Handle< T >

An object reference managed by the v8 garbage collector.

All objects returned from v8 have to be tracked by the garbage collector so that it knows that the objects are still alive. Also, because the garbage collector may move objects, it is unsafe to point directly to an object. Instead, all objects are stored in handles which are known by the garbage collector and updated whenever an object moves. Handles should always be passed by value (except in cases like out-parameters) and they should never be allocated on the heap.

There are two types of handles: local and persistent handles. Local handles are light-weight and transient and typically used in local operations. They are managed by HandleScopes. Persistent handles can be used when storing objects across several independent operations and have to be explicitly deallocated when they're no longer used.

It is safe to extract the object stored in the handle by dereferencing the handle (for instance, to extract the Object* from an Handle<Object>); the value will still be governed by a handle behind the scenes and the same rules apply to these values as to their handles.

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


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

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

Creates an empty handle.

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

template<class T>
v8::Handle< T >::Handle ( T *  val  )  [inline, explicit]

Creates a new handle for the specified value.

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

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

Creates a handle for the contents of the specified handle. This constructor allows you to pass handles as arguments by value and to assign between handles. However, if you try to assign between incompatible handles, for instance from a Handle<String> to a Handle<Number> it will cause a compiletime error. Assigning between compatible handles, for instance assigning a Handle<String> to a variable declared as Handle<Value>, is legal because 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.h190 行で定義されています。


関数

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

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

template<class T>
void v8::Handle< T >::Clear (  )  [inline]

Sets the handle to be empty. IsEmpty() will then return true.

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

参照元 v8::ReadLineEditor::CompletionGenerator().

template<class T>
bool v8::Handle< T >::IsEmpty (  )  [inline]
template<class T>
template<class S >
bool v8::Handle< T >::operator!= ( Handle< S >  that  )  [inline]

Checks whether two handles are different. Returns true if only one of the handles is empty, or if the objects to which they refer are different. The handles' references are not checked.

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

template<class T >
T * v8::Handle< T >::operator* (  ) 

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

参照先 v8::Handle< T >::val_.

template<class T >
T * v8::Handle< T >::operator-> (  ) 

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

参照先 v8::Handle< T >::val_.

template<class T>
template<class S >
bool v8::Handle< T >::operator== ( Handle< S >  that  )  [inline]

Checks whether two handles are the same. Returns true if both are empty, or if the objects to which they refer are identical. The handles' references are not checked.

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


変数

template<class T>
T* v8::Handle< T >::val_ [private]

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

参照元 v8::Handle< T >::operator*(), と v8::Handle< T >::operator->().


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