Public Member Functions | Static Public Member Functions

v8::Object Class Reference

#include <v8.h>

Inheritance diagram for v8::Object:
v8::Value v8::Data v8::Array v8::BooleanObject v8::Date v8::Function v8::NumberObject v8::RegExp v8::StringObject

List of all members.

Public Member Functions

V8EXPORT bool Set (Handle< Value > key, Handle< Value > value, PropertyAttribute attribs=None)
V8EXPORT bool Set (uint32_t index, Handle< Value > value)
V8EXPORT bool ForceSet (Handle< Value > key, Handle< Value > value, PropertyAttribute attribs=None)
V8EXPORT Local< ValueGet (Handle< Value > key)
V8EXPORT Local< ValueGet (uint32_t index)
V8EXPORT PropertyAttribute GetPropertyAttributes (Handle< Value > key)
V8EXPORT bool Has (Handle< String > key)
V8EXPORT bool Delete (Handle< String > key)
V8EXPORT bool ForceDelete (Handle< Value > key)
V8EXPORT bool Has (uint32_t index)
V8EXPORT bool Delete (uint32_t index)
V8EXPORT bool SetAccessor (Handle< String > name, AccessorGetter getter, AccessorSetter setter=0, Handle< Value > data=Handle< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None)
V8EXPORT Local< ArrayGetPropertyNames ()
V8EXPORT Local< ArrayGetOwnPropertyNames ()
V8EXPORT Local< ValueGetPrototype ()
V8EXPORT bool SetPrototype (Handle< Value > prototype)
V8EXPORT Local< ObjectFindInstanceInPrototypeChain (Handle< FunctionTemplate > tmpl)
V8EXPORT Local< StringObjectProtoToString ()
V8EXPORT Local< StringGetConstructorName ()
V8EXPORT int InternalFieldCount ()
Local< ValueGetInternalField (int index)
V8EXPORT void SetInternalField (int index, Handle< Value > value)
void * GetPointerFromInternalField (int index)
V8EXPORT void SetPointerInInternalField (int index, void *value)
V8EXPORT bool HasOwnProperty (Handle< String > key)
V8EXPORT bool HasRealNamedProperty (Handle< String > key)
V8EXPORT bool HasRealIndexedProperty (uint32_t index)
V8EXPORT bool HasRealNamedCallbackProperty (Handle< String > key)
V8EXPORT Local< ValueGetRealNamedPropertyInPrototypeChain (Handle< String > key)
V8EXPORT Local< ValueGetRealNamedProperty (Handle< String > key)
V8EXPORT bool HasNamedLookupInterceptor ()
V8EXPORT bool HasIndexedLookupInterceptor ()
V8EXPORT void TurnOnAccessCheck ()
V8EXPORT int GetIdentityHash ()
V8EXPORT bool SetHiddenValue (Handle< String > key, Handle< Value > value)
V8EXPORT Local< ValueGetHiddenValue (Handle< String > key)
V8EXPORT bool DeleteHiddenValue (Handle< String > key)
V8EXPORT bool IsDirty ()
V8EXPORT Local< ObjectClone ()
V8EXPORT Local< ContextCreationContext ()
V8EXPORT void SetIndexedPropertiesToPixelData (uint8_t *data, int length)
V8EXPORT bool HasIndexedPropertiesInPixelData ()
V8EXPORT uint8_t * GetIndexedPropertiesPixelData ()
V8EXPORT int GetIndexedPropertiesPixelDataLength ()
V8EXPORT void SetIndexedPropertiesToExternalArrayData (void *data, ExternalArrayType array_type, int number_of_elements)
V8EXPORT bool HasIndexedPropertiesInExternalArrayData ()
V8EXPORT void * GetIndexedPropertiesExternalArrayData ()
V8EXPORT ExternalArrayType GetIndexedPropertiesExternalArrayDataType ()
V8EXPORT int GetIndexedPropertiesExternalArrayDataLength ()
V8EXPORT bool IsCallable ()
V8EXPORT Local< ValueCallAsFunction (Handle< Object > recv, int argc, Handle< Value > argv[])
V8EXPORT Local< ValueCallAsConstructor (int argc, Handle< Value > argv[])

Static Public Member Functions

static V8EXPORT Local< ObjectNew ()
static ObjectCast (Value *obj)

Detailed Description

A JavaScript object (ECMA-262, 4.3.3)


Member Function Documentation

V8EXPORT Local<Value> v8::Object::CallAsConstructor ( int  argc,
Handle< Value argv[] 
)

Call an Object as a constructor if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method. Note: This method behaves like the Function::NewInstance method.

V8EXPORT Local<Value> v8::Object::CallAsFunction ( Handle< Object recv,
int  argc,
Handle< Value argv[] 
)

Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

V8EXPORT Local<Object> v8::Object::Clone (  ) 

Clone this object with a fast but shallow copy. Values will point to the same values as the original object.

V8EXPORT Local<Context> v8::Object::CreationContext (  ) 

Returns the context in which the object was created.

V8EXPORT Local<Object> v8::Object::FindInstanceInPrototypeChain ( Handle< FunctionTemplate tmpl  ) 

Finds an instance of the given function template in the prototype chain.

V8EXPORT Local<String> v8::Object::GetConstructorName (  ) 

Returns the name of the function invoked as a constructor for this object.

V8EXPORT int v8::Object::GetIdentityHash (  ) 

Returns the identity hash for this object. The current implementation uses a hidden property on the object to store the identity hash.

The return value will never be 0. Also, it is not guaranteed to be unique.

Local< Value > v8::Object::GetInternalField ( int  index  )  [inline]

Gets the value in an internal field.

References v8::Handle< T >::IsEmpty().

V8EXPORT Local<Array> v8::Object::GetOwnPropertyNames (  ) 

This function has the same functionality as GetPropertyNames but the returned array doesn't contain the names of properties from prototype objects.

void * v8::Object::GetPointerFromInternalField ( int  index  )  [inline]

Gets a native pointer from an internal field.

V8EXPORT PropertyAttribute v8::Object::GetPropertyAttributes ( Handle< Value key  ) 

Gets the property attributes of a property which can be None or any combination of ReadOnly, DontEnum and DontDelete. Returns None when the property doesn't exist.

V8EXPORT Local<Array> v8::Object::GetPropertyNames (  ) 

Returns an array containing the names of the enumerable properties of this object, including properties from prototype objects. The array returned by this method contains the same values as would be enumerated by a for-in statement over this object.

V8EXPORT Local<Value> v8::Object::GetPrototype (  ) 

Get the prototype object. This does not skip objects marked to be skipped by __proto__ and it does not consult the security handler.

V8EXPORT Local<Value> v8::Object::GetRealNamedProperty ( Handle< String key  ) 

If result.IsEmpty() no real property was located on the object or in the prototype chain. This means interceptors in the prototype chain are not called.

V8EXPORT Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain ( Handle< String key  ) 

If result.IsEmpty() no real property was located in the prototype chain. This means interceptors in the prototype chain are not called.

V8EXPORT bool v8::Object::HasIndexedLookupInterceptor (  ) 

Tests for an index lookup interceptor.

V8EXPORT bool v8::Object::HasNamedLookupInterceptor (  ) 

Tests for a named lookup interceptor.

V8EXPORT int v8::Object::InternalFieldCount (  ) 

Gets the number of internal fields for this Object.

V8EXPORT bool v8::Object::IsCallable (  ) 

Checks whether a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method. When an Object is callable this method returns true.

V8EXPORT bool v8::Object::IsDirty (  ) 

Returns true if this is an instance of an api function (one created from a function created from a function template) and has been modified since it was created. Note that this method is conservative and may return true for objects that haven't actually been modified.

V8EXPORT Local<String> v8::Object::ObjectProtoToString (  ) 

Call builtin Object.prototype.toString on this object. This is different from Value::ToString() that may call user-defined toString function. This one does not.

V8EXPORT bool v8::Object::SetHiddenValue ( Handle< String key,
Handle< Value value 
)

Access hidden properties on JavaScript objects. These properties are hidden from the executing JavaScript and only accessible through the V8 C++ API. Hidden properties introduced by V8 internally (for example the identity hash) are prefixed with "v8::".

V8EXPORT void v8::Object::SetIndexedPropertiesToExternalArrayData ( void *  data,
ExternalArrayType  array_type,
int  number_of_elements 
)

Set the backing store of the indexed properties to be managed by the embedding layer. Access to the indexed properties will follow the rules spelled out for the CanvasArray subtypes in the WebGL specification. Note: The embedding program still owns the data and needs to ensure that the backing store is preserved while V8 has a reference.

V8EXPORT void v8::Object::SetIndexedPropertiesToPixelData ( uint8_t *  data,
int  length 
)

Set the backing store of the indexed properties to be managed by the embedding layer. Access to the indexed properties will follow the rules spelled out in CanvasPixelArray. Note: The embedding program still owns the data and needs to ensure that the backing store is preserved while V8 has a reference.

V8EXPORT void v8::Object::SetInternalField ( int  index,
Handle< Value value 
)

Sets the value in an internal field.

V8EXPORT void v8::Object::SetPointerInInternalField ( int  index,
void *  value 
)

Sets a native pointer in an internal field.

V8EXPORT bool v8::Object::SetPrototype ( Handle< Value prototype  ) 

Set the prototype object. This does not skip objects marked to be skipped by __proto__ and it does not consult the security handler.

V8EXPORT void v8::Object::TurnOnAccessCheck (  ) 

Turns on access check on the object if the object is an instance of a template that has access check callbacks. If an object has no access check info, the object cannot be accessed by anyone.


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