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

クラス v8::ObjectTemplate

#include <v8.h>

v8::Templateを継承しています。

すべてのメンバ一覧

Public メソッド

Local< ObjectNewInstance ()
void SetAccessor (Handle< String > name, AccessorGetter getter, AccessorSetter setter=0, Handle< Value > data=Handle< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None)
void SetNamedPropertyHandler (NamedPropertyGetter getter, NamedPropertySetter setter=0, NamedPropertyQuery query=0, NamedPropertyDeleter deleter=0, NamedPropertyEnumerator enumerator=0, Handle< Value > data=Handle< Value >())
void SetIndexedPropertyHandler (IndexedPropertyGetter getter, IndexedPropertySetter setter=0, IndexedPropertyQuery query=0, IndexedPropertyDeleter deleter=0, IndexedPropertyEnumerator enumerator=0, Handle< Value > data=Handle< Value >())
void SetCallAsFunctionHandler (InvocationCallback callback, Handle< Value > data=Handle< Value >())
void MarkAsUndetectable ()
void SetAccessCheckCallbacks (NamedSecurityCallback named_handler, IndexedSecurityCallback indexed_handler, Handle< Value > data=Handle< Value >(), bool turned_on_by_default=true)
int InternalFieldCount ()
void SetInternalFieldCount (int value)

Static Public メソッド

static Local< ObjectTemplateNew ()

Private メソッド

 ObjectTemplate ()

Static Private メソッド

static Local< ObjectTemplateNew (Handle< FunctionTemplate > constructor)

フレンド

class FunctionTemplate

説明

An ObjectTemplate is used to create objects at runtime.

Properties added to an ObjectTemplate are added to each object created from the ObjectTemplate.

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


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

v8::ObjectTemplate::ObjectTemplate (  )  [private]

関数

int v8::ObjectTemplate::InternalFieldCount (  ) 

Gets the number of internal fields for objects generated from this template.

api.cc964 行で定義されています。

参照先 v8::internal::Smi::cast(), v8::IsDeadCheck(), と v8::Utils::OpenHandle().

void v8::ObjectTemplate::MarkAsUndetectable (  ) 

Mark object instances of the template as undetectable.

In many ways, undetectable objects behave as though they are not there. They behave like 'undefined' in conditionals and when printed. However, properties can be accessed and called as on normal objects.

api.cc893 行で定義されています。

参照先 v8::internal::FunctionTemplateInfo::cast(), v8::EnsureConstructor(), v8::IsDeadCheck(), と v8::Utils::OpenHandle().

Local< ObjectTemplate > v8::ObjectTemplate::New ( v8::Handle< FunctionTemplate constructor  )  [static, private]
Local< ObjectTemplate > v8::ObjectTemplate::New (  )  [static]

Creates an ObjectTemplate.

api.cc817 行で定義されています。

参照元 v8::Shell::Initialize(), と v8::FunctionTemplate::PrototypeTemplate().

Local< v8::Object > v8::ObjectTemplate::NewInstance (  ) 

Creates a new instance of this template.

api.cc2337 行で定義されています。

参照先 EXCEPTION_BAILOUT_CHECK, EXCEPTION_PREAMBLE, v8::internal::Execution::InstantiateObject(), LOG_API, ON_BAILOUT, v8::Utils::OpenHandle(), と v8::Utils::ToLocal().

void v8::ObjectTemplate::SetAccessCheckCallbacks ( NamedSecurityCallback  named_handler,
IndexedSecurityCallback  indexed_handler,
Handle< Value data = Handle<Value>(),
bool  turned_on_by_default = true 
)

Sets access check callbacks on the object template.

When accessing properties on instances of this object template, the access check callback will be called to determine whether or not to allow cross-context access to the properties. The last parameter specifies whether access checks are turned on by default on instances. If access checks are off by default, they can be turned on on individual instances by calling Object::TurnOnAccessCheck().

api.cc904 行で定義されています。

参照先 v8::internal::ACCESS_CHECK_INFO_TYPE, v8::internal::FunctionTemplateInfo::cast(), v8::EnsureConstructor(), v8::FromCData(), v8::IsDeadCheck(), v8::Handle< T >::IsEmpty(), v8::internal::Factory::NewStruct(), v8::Utils::OpenHandle(), と v8::Undefined().

void v8::ObjectTemplate::SetAccessor ( v8::Handle< String name,
AccessorGetter  getter,
AccessorSetter  setter = 0,
v8::Handle< Value data = Handle<Value>(),
AccessControl  settings = DEFAULT,
PropertyAttribute  attribute = None 
)

Sets an accessor on the object template.

Whenever the property with the given name is accessed on objects created from this ObjectTemplate the getter and setter callbacks are called instead of getting and setting the property directly on the JavaScript object.

引数:
name The name of the property for which an accessor is added.
getter The callback to invoke when getting the property.
setter The callback to invoke when setting the property.
data A piece of data that will be passed to the getter and setter callbacks whenever they are invoked.
settings Access control settings for the accessor. This is a bit field consisting of one of more of DEFAULT = 0, ALL_CAN_READ = 1, or ALL_CAN_WRITE = 2. The default is to not allow cross-context access. ALL_CAN_READ means that all cross-context reads are allowed. ALL_CAN_WRITE means that all cross-context writes are allowed. The combination ALL_CAN_READ | ALL_CAN_WRITE can be used to allow all cross-context access.
attribute The attributes of the property for which an accessor is added.

api.cc851 行で定義されています。

参照先 v8::internal::FunctionTemplateInfo::cast(), v8::EnsureConstructor(), v8::IsDeadCheck(), v8::Utils::OpenHandle(), と v8::Utils::ToLocal().

void v8::ObjectTemplate::SetCallAsFunctionHandler ( InvocationCallback  callback,
Handle< Value data = Handle<Value>() 
)

Sets the callback to be used when calling instances created from this template as a function. If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function.

api.cc952 行で定義されています。

参照先 v8::internal::FunctionTemplateInfo::cast(), v8::EnsureConstructor(), v8::IsDeadCheck(), v8::Utils::OpenHandle(), と v8::Utils::ToLocal().

void v8::ObjectTemplate::SetIndexedPropertyHandler ( IndexedPropertyGetter  getter,
IndexedPropertySetter  setter = 0,
IndexedPropertyQuery  query = 0,
IndexedPropertyDeleter  deleter = 0,
IndexedPropertyEnumerator  enumerator = 0,
Handle< Value data = Handle<Value>() 
)

Sets an indexed property handler on the object template.

Whenever an indexed property is accessed on objects created from this object template, the provided callback is invoked instead of accessing the property directly on the JavaScript object.

引数:
getter The callback to invoke when getting a property.
setter The callback to invoke when setting a property.
query The callback to invoke to check is an object has a property.
deleter The callback to invoke when deleting a property.
enumerator The callback to invoke to enumerate all the indexed properties of an object.
data A piece of data that will be passed to the callbacks whenever they are invoked.

api.cc930 行で定義されています。

参照先 v8::internal::FunctionTemplateInfo::cast(), v8::EnsureConstructor(), v8::IsDeadCheck(), v8::Utils::OpenHandle(), と v8::Utils::ToLocal().

void v8::ObjectTemplate::SetInternalFieldCount ( int  value  ) 

Sets the number of internal fields for objects generated from this template.

api.cc972 行で定義されています。

参照先 v8::ApiCheck(), v8::EnsureConstructor(), v8::internal::Smi::FromInt(), v8::IsDeadCheck(), v8::internal::Smi::IsValid(), と v8::Utils::OpenHandle().

void v8::ObjectTemplate::SetNamedPropertyHandler ( NamedPropertyGetter  getter,
NamedPropertySetter  setter = 0,
NamedPropertyQuery  query = 0,
NamedPropertyDeleter  deleter = 0,
NamedPropertyEnumerator  enumerator = 0,
Handle< Value data = Handle<Value>() 
)

Sets a named property handler on the object template.

Whenever a named property is accessed on objects created from this object template, the provided callback is invoked instead of accessing the property directly on the JavaScript object.

引数:
getter The callback to invoke when getting a property.
setter The callback to invoke when setting a property.
query The callback to invoke to check is an object has a property.
deleter The callback to invoke when deleting a property.
enumerator The callback to invoke to enumerate all the named properties of an object.
data A piece of data that will be passed to the callbacks whenever they are invoked.

api.cc872 行で定義されています。

参照先 v8::internal::FunctionTemplateInfo::cast(), v8::EnsureConstructor(), v8::IsDeadCheck(), v8::Utils::OpenHandle(), と v8::Utils::ToLocal().


フレンドと関連する関数

friend class FunctionTemplate [friend]

v8::Templateを再定義しています。

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


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