Overview   Project   Class   Tree   Index 
CEF C++ API Docs - Revision 1123
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefV8Value

CefBase
   |
   +--CefV8Value

   in cef_v8.h

class CefV8Value
extends CefBase

Class representing a V8 value. The methods of this class may only be called on the UI thread.


Inner Classes, Typedefs, and Enums
typedef CefV8Value::AccessControl
          
typedef CefV8Value::PropertyAttribute
          
 
Method Summary
 virtual int AdjustExternallyAllocatedMemory( int change_in_bytes )= 0
          Adjusts the amount of registered external memory for the object.
 virtual bool ClearException()= 0
          Clears the last exception and returns true on success.
 static CefRefPtr< CefV8Value > CreateArray( int length )
          Create a new CefV8Value object of type array with the specified |length|.
 static CefRefPtr< CefV8Value > CreateBool( bool value )
          Create a new CefV8Value object of type bool.
 static CefRefPtr< CefV8Value > CreateDate( const CefTime& date )
          Create a new CefV8Value object of type Date.
 static CefRefPtr< CefV8Value > CreateDouble( double value )
          Create a new CefV8Value object of type double.
 static CefRefPtr< CefV8Value > CreateFunction( const CefString& name, CefRefPtr< CefV8Handler > handler )
          Create a new CefV8Value object of type function.
 static CefRefPtr< CefV8Value > CreateInt( int32 value )
          Create a new CefV8Value object of type int.
 static CefRefPtr< CefV8Value > CreateNull()
          Create a new CefV8Value object of type null.
 static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefV8Accessor > accessor )
          Create a new CefV8Value object of type object with optional accessor.
 static CefRefPtr< CefV8Value > CreateString( const CefString& value )
          Create a new CefV8Value object of type string.
 static CefRefPtr< CefV8Value > CreateUInt( uint32 value )
          Create a new CefV8Value object of type unsigned int.
 static CefRefPtr< CefV8Value > CreateUndefined()
          Create a new CefV8Value object of type undefined.
 virtual bool DeleteValue( const CefString& key )= 0
          Deletes the value with the specified identifier and returns true on success.
 virtual bool DeleteValue( int index )= 0
          Deletes the value with the specified identifier and returns true on success.
 virtual CefRefPtr< CefV8Value > ExecuteFunction( CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0
          Execute the function using the current V8 context.
 virtual CefRefPtr< CefV8Value > ExecuteFunctionWithContext( CefRefPtr< CefV8Context > context, CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0
          Execute the function using the specified V8 context.
 virtual int GetArrayLength()= 0
          Returns the number of elements in the array.
 virtual bool GetBoolValue()= 0
          Return a bool value.
 virtual CefTime GetDateValue()= 0
          Return a Date value.
 virtual double GetDoubleValue()= 0
          Return a double value.
 virtual CefRefPtr< CefV8Exception > GetException()= 0
          Returns the exception resulting from the last method call.
 virtual int GetExternallyAllocatedMemory()= 0
          Returns the amount of externally allocated memory registered for the object.
 virtual CefRefPtr< CefV8Handler > GetFunctionHandler()= 0
          Returns the function handler or NULL if not a CEF-created function.
 virtual CefString GetFunctionName()= 0
          Returns the function name.
 virtual int32 GetIntValue()= 0
          Return an int value.
 virtual bool GetKeys( std::vector< CefString >& keys )= 0
          Read the keys for the object's values into the specified vector.
 virtual CefString GetStringValue()= 0
          Return a string value.
 virtual uint32 GetUIntValue()= 0
          Return an unisgned int value.
 virtual CefRefPtr< CefBase > GetUserData()= 0
          Returns the user data, if any, assigned to this object.
 virtual CefRefPtr< CefV8Value > GetValue( int index )= 0
          Returns the value with the specified identifier on success.
 virtual CefRefPtr< CefV8Value > GetValue( const CefString& key )= 0
          Returns the value with the specified identifier on success.
 virtual bool HasException()= 0
          Returns true if the last method call resulted in an exception.
 virtual bool HasValue( int index )= 0
          Returns true if the object has a value with the specified identifier.
 virtual bool HasValue( const CefString& key )= 0
          Returns true if the object has a value with the specified identifier.
 virtual bool IsArray()= 0
          True if the value type is array.
 virtual bool IsBool()= 0
          True if the value type is bool.
 virtual bool IsDate()= 0
          True if the value type is Date.
 virtual bool IsDouble()= 0
          True if the value type is double.
 virtual bool IsFunction()= 0
          True if the value type is function.
 virtual bool IsInt()= 0
          True if the value type is int.
 virtual bool IsNull()= 0
          True if the value type is null.
 virtual bool IsObject()= 0
          True if the value type is object.
 virtual bool IsSame( CefRefPtr< CefV8Value > that )= 0
          Returns true if this object is pointing to the same handle as |that| object.
 virtual bool IsString()= 0
          True if the value type is string.
 virtual bool IsUInt()= 0
          True if the value type is unsigned int.
 virtual bool IsUndefined()= 0
          True if the value type is undefined.
 virtual bool IsUserCreated()= 0
          Returns true if this is a user created object.
 virtual bool IsValid()= 0
          Returns true if this object is valid.
 virtual bool SetRethrowExceptions( bool rethrow )= 0
          Set whether this object will re-throw future exceptions.
 virtual bool SetUserData( CefRefPtr< CefBase > user_data )= 0
          Sets the user data for this object and returns true on success.
 virtual bool SetValue( const CefString& key, CefRefPtr< CefV8Value > value, CefV8Value::PropertyAttribute attribute )= 0
          Associates a value with the specified identifier and returns true on success.
 virtual bool SetValue( int index, CefRefPtr< CefV8Value > value )= 0
          Associates a value with the specified identifier and returns true on success.
 virtual bool SetValue( const CefString& key, CefV8Value::AccessControl settings, CefV8Value::PropertyAttribute attribute )= 0
          Registers an identifier and returns true on success.
 virtual bool WillRethrowExceptions()= 0
          Returns true if this object will re-throw future exceptions.
   
Methods inherited from class CefBase
AddRef, Release, GetRefCt
 

Method Detail

AdjustExternallyAllocatedMemory

public virtual int AdjustExternallyAllocatedMemory( int change_in_bytes )= 0;
Adjusts the amount of registered external memory for the object. Used to give V8 an indication of the amount of externally allocated memory that is kept alive by JavaScript objects. V8 uses this information to decide when to perform global garbage collection. Each CefV8Value tracks the amount of external memory associated with it and automatically decreases the global total by the appropriate amount on its destruction. |change_in_bytes| specifies the number of bytes to adjust by. This method returns the number of bytes associated with the object after the adjustment. This method can only be called on user created objects.

ClearException

public virtual bool ClearException()= 0;
Clears the last exception and returns true on success.

CreateArray

public static CefRefPtr< CefV8Value > CreateArray( int length );
Create a new CefV8Value object of type array with the specified |length|. If |length| is negative the returned array will have length 0. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateBool

public static CefRefPtr< CefV8Value > CreateBool( bool value );
Create a new CefV8Value object of type bool.

CreateDate

public static CefRefPtr< CefV8Value > CreateDate( const CefTime& date );
Create a new CefV8Value object of type Date. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateDouble

public static CefRefPtr< CefV8Value > CreateDouble( double value );
Create a new CefV8Value object of type double.

CreateFunction

public static CefRefPtr< CefV8Value > CreateFunction( const CefString& name, CefRefPtr< CefV8Handler > handler );
Create a new CefV8Value object of type function. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateInt

public static CefRefPtr< CefV8Value > CreateInt( int32 value );
Create a new CefV8Value object of type int.

CreateNull

public static CefRefPtr< CefV8Value > CreateNull();
Create a new CefV8Value object of type null.

CreateObject

public static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefV8Accessor > accessor );
Create a new CefV8Value object of type object with optional accessor. This method should only be called from within the scope of a CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateString

public static CefRefPtr< CefV8Value > CreateString( const CefString& value );
Create a new CefV8Value object of type string.

CreateUInt

public static CefRefPtr< CefV8Value > CreateUInt( uint32 value );
Create a new CefV8Value object of type unsigned int.

CreateUndefined

public static CefRefPtr< CefV8Value > CreateUndefined();
Create a new CefV8Value object of type undefined.

DeleteValue

public virtual bool DeleteValue( const CefString& key )= 0;
Deletes the value with the specified identifier and returns true on success. Returns false if this method is called incorrectly or an exception is thrown. For read-only and don't-delete values this method will return true even though deletion failed.

DeleteValue

public virtual bool DeleteValue( int index )= 0;
Deletes the value with the specified identifier and returns true on success. Returns false if this method is called incorrectly, deletion fails or an exception is thrown. For read-only and don't-delete values this method will return true even though deletion failed.

ExecuteFunction

public virtual CefRefPtr< CefV8Value > ExecuteFunction( CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0;
Execute the function using the current V8 context. This method should only be called from within the scope of a CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference. |object| is the receiver ('this' object) of the function. If |object| is empty the current context's global object will be used. |arguments| is the list of arguments that will be passed to the function. Returns the function return value on success. Returns NULL if this method is called incorrectly or an exception is thrown.

ExecuteFunctionWithContext

public virtual CefRefPtr< CefV8Value > ExecuteFunctionWithContext( CefRefPtr< CefV8Context > context, CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0;
Execute the function using the specified V8 context. |object| is the receiver ('this' object) of the function. If |object| is empty the specified context's global object will be used. |arguments| is the list of arguments that will be passed to the function. Returns the function return value on success. Returns NULL if this method is called incorrectly or an exception is thrown.

GetArrayLength

public virtual int GetArrayLength()= 0;
Returns the number of elements in the array.

GetBoolValue

public virtual bool GetBoolValue()= 0;
Return a bool value. The underlying data will be converted to if necessary.

GetDateValue

public virtual CefTime GetDateValue()= 0;
Return a Date value. The underlying data will be converted to if necessary.

GetDoubleValue

public virtual double GetDoubleValue()= 0;
Return a double value. The underlying data will be converted to if necessary.

GetException

public virtual CefRefPtr< CefV8Exception > GetException()= 0;
Returns the exception resulting from the last method call. This attribute exists only in the scope of the current CEF value object.

GetExternallyAllocatedMemory

public virtual int GetExternallyAllocatedMemory()= 0;
Returns the amount of externally allocated memory registered for the object.

GetFunctionHandler

public virtual CefRefPtr< CefV8Handler > GetFunctionHandler()= 0;
Returns the function handler or NULL if not a CEF-created function.

GetFunctionName

public virtual CefString GetFunctionName()= 0;
Returns the function name.

GetIntValue

public virtual int32 GetIntValue()= 0;
Return an int value. The underlying data will be converted to if necessary.

GetKeys

public virtual bool GetKeys( std::vector< CefString >& keys )= 0;
Read the keys for the object's values into the specified vector. Integer- based keys will also be returned as strings.

GetStringValue

public virtual CefString GetStringValue()= 0;
Return a string value. The underlying data will be converted to if necessary.

GetUIntValue

public virtual uint32 GetUIntValue()= 0;
Return an unisgned int value. The underlying data will be converted to if necessary.

GetUserData

public virtual CefRefPtr< CefBase > GetUserData()= 0;
Returns the user data, if any, assigned to this object.

GetValue

public virtual CefRefPtr< CefV8Value > GetValue( int index )= 0;
Returns the value with the specified identifier on success. Returns NULL if this method is called incorrectly or an exception is thrown.

GetValue

public virtual CefRefPtr< CefV8Value > GetValue( const CefString& key )= 0;
Returns the value with the specified identifier on success. Returns NULL if this method is called incorrectly or an exception is thrown.

HasException

public virtual bool HasException()= 0;
Returns true if the last method call resulted in an exception. This attribute exists only in the scope of the current CEF value object.

HasValue

public virtual bool HasValue( int index )= 0;
Returns true if the object has a value with the specified identifier.

HasValue

public virtual bool HasValue( const CefString& key )= 0;
Returns true if the object has a value with the specified identifier.

IsArray

public virtual bool IsArray()= 0;
True if the value type is array.

IsBool

public virtual bool IsBool()= 0;
True if the value type is bool.

IsDate

public virtual bool IsDate()= 0;
True if the value type is Date.

IsDouble

public virtual bool IsDouble()= 0;
True if the value type is double.

IsFunction

public virtual bool IsFunction()= 0;
True if the value type is function.

IsInt

public virtual bool IsInt()= 0;
True if the value type is int.

IsNull

public virtual bool IsNull()= 0;
True if the value type is null.

IsObject

public virtual bool IsObject()= 0;
True if the value type is object.

IsSame

public virtual bool IsSame( CefRefPtr< CefV8Value > that )= 0;
Returns true if this object is pointing to the same handle as |that| object.

IsString

public virtual bool IsString()= 0;
True if the value type is string.

IsUInt

public virtual bool IsUInt()= 0;
True if the value type is unsigned int.

IsUndefined

public virtual bool IsUndefined()= 0;
True if the value type is undefined.

IsUserCreated

public virtual bool IsUserCreated()= 0;
Returns true if this is a user created object.

IsValid

public virtual bool IsValid()= 0;
Returns true if this object is valid. Do not call any other methods if this method returns false.

SetRethrowExceptions

public virtual bool SetRethrowExceptions( bool rethrow )= 0;
Set whether this object will re-throw future exceptions. By default exceptions are not re-thrown. If a exception is re-thrown the current context should not be accessed again until after the exception has been caught and not re-thrown. Returns true on success. This attribute exists only in the scope of the current CEF value object.

SetUserData

public virtual bool SetUserData( CefRefPtr< CefBase > user_data )= 0;
Sets the user data for this object and returns true on success. Returns false if this method is called incorrectly. This method can only be called on user created objects.

SetValue

public virtual bool SetValue( const CefString& key, CefRefPtr< CefV8Value > value, CefV8Value::PropertyAttribute attribute )= 0;
Associates a value with the specified identifier and returns true on success. Returns false if this method is called incorrectly or an exception is thrown. For read-only values this method will return true even though assignment failed.

SetValue

public virtual bool SetValue( int index, CefRefPtr< CefV8Value > value )= 0;
Associates a value with the specified identifier and returns true on success. Returns false if this method is called incorrectly or an exception is thrown. For read-only values this method will return true even though assignment failed.

SetValue

public virtual bool SetValue( const CefString& key, CefV8Value::AccessControl settings, CefV8Value::PropertyAttribute attribute )= 0;
Registers an identifier and returns true on success. Access to the identifier will be forwarded to the CefV8Accessor instance passed to CefV8Value::CreateObject(). Returns false if this method is called incorrectly or an exception is thrown. For read-only values this method will return true even though assignment failed.

WillRethrowExceptions

public virtual bool WillRethrowExceptions()= 0;
Returns true if this object will re-throw future exceptions. This attribute exists only in the scope of the current CEF value object.

 Overview   Project   Class   Tree   Index 
CEF C++ API Docs - Revision 1123
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2011 Marshall A. Greenblatt