Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
CefValue Class Referenceabstract

Class that wraps other data value types. More...

#include "include/cef_values.h"

Inheritance diagram for CefValue:
CefBaseRefCounted

Public Member Functions

virtual bool IsValid ()=0
 Returns true if the underlying data is valid. More...
 
virtual bool IsOwned ()=0
 Returns true if the underlying data is owned by another object. More...
 
virtual bool IsReadOnly ()=0
 Returns true if the underlying data is read-only. More...
 
virtual bool IsSame (CefRefPtr< CefValue > that)=0
 Returns true if this object and |that| object have the same underlying data. More...
 
virtual bool IsEqual (CefRefPtr< CefValue > that)=0
 Returns true if this object and |that| object have an equivalent underlying value but are not necessarily the same object. More...
 
virtual CefRefPtr< CefValueCopy ()=0
 Returns a copy of this object. More...
 
virtual CefValueType GetType ()=0
 Returns the underlying value type. More...
 
virtual bool GetBool ()=0
 Returns the underlying value as type bool. More...
 
virtual int GetInt ()=0
 Returns the underlying value as type int. More...
 
virtual double GetDouble ()=0
 Returns the underlying value as type double. More...
 
virtual CefString GetString ()=0
 Returns the underlying value as type string. More...
 
virtual CefRefPtr< CefBinaryValueGetBinary ()=0
 Returns the underlying value as type binary. More...
 
virtual CefRefPtr< CefDictionaryValueGetDictionary ()=0
 Returns the underlying value as type dictionary. More...
 
virtual CefRefPtr< CefListValueGetList ()=0
 Returns the underlying value as type list. More...
 
virtual bool SetNull ()=0
 Sets the underlying value as type null. More...
 
virtual bool SetBool (bool value)=0
 Sets the underlying value as type bool. More...
 
virtual bool SetInt (int value)=0
 Sets the underlying value as type int. More...
 
virtual bool SetDouble (double value)=0
 Sets the underlying value as type double. More...
 
virtual bool SetString (const CefString &value)=0
 Sets the underlying value as type string. More...
 
virtual bool SetBinary (CefRefPtr< CefBinaryValue > value)=0
 Sets the underlying value as type binary. More...
 
virtual bool SetDictionary (CefRefPtr< CefDictionaryValue > value)=0
 Sets the underlying value as type dict. More...
 
virtual bool SetList (CefRefPtr< CefListValue > value)=0
 Sets the underlying value as type list. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefValueCreate ()
 Creates a new object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class that wraps other data value types.

Complex types (binary, dictionary and list) will be referenced but not owned by this object. Can be used on any process and thread.

Member Function Documentation

◆ Copy()

virtual CefRefPtr<CefValue> CefValue::Copy ( )
pure virtual

Returns a copy of this object.

The underlying data will also be copied.

◆ Create()

static CefRefPtr<CefValue> CefValue::Create ( )
static

Creates a new object.

◆ GetBinary()

virtual CefRefPtr<CefBinaryValue> CefValue::GetBinary ( )
pure virtual

Returns the underlying value as type binary.

The returned reference may become invalid if the value is owned by another object or if ownership is transferred to another object in the future. To maintain a reference to the value after assigning ownership to a dictionary or list pass this object to the SetValue() method instead of passing the returned reference to SetBinary().

◆ GetBool()

virtual bool CefValue::GetBool ( )
pure virtual

Returns the underlying value as type bool.

◆ GetDictionary()

virtual CefRefPtr<CefDictionaryValue> CefValue::GetDictionary ( )
pure virtual

Returns the underlying value as type dictionary.

The returned reference may become invalid if the value is owned by another object or if ownership is transferred to another object in the future. To maintain a reference to the value after assigning ownership to a dictionary or list pass this object to the SetValue() method instead of passing the returned reference to SetDictionary().

◆ GetDouble()

virtual double CefValue::GetDouble ( )
pure virtual

Returns the underlying value as type double.

◆ GetInt()

virtual int CefValue::GetInt ( )
pure virtual

Returns the underlying value as type int.

◆ GetList()

virtual CefRefPtr<CefListValue> CefValue::GetList ( )
pure virtual

Returns the underlying value as type list.

The returned reference may become invalid if the value is owned by another object or if ownership is transferred to another object in the future. To maintain a reference to the value after assigning ownership to a dictionary or list pass this object to the SetValue() method instead of passing the returned reference to SetList().

◆ GetString()

virtual CefString CefValue::GetString ( )
pure virtual

Returns the underlying value as type string.

◆ GetType()

virtual CefValueType CefValue::GetType ( )
pure virtual

Returns the underlying value type.

◆ IsEqual()

virtual bool CefValue::IsEqual ( CefRefPtr< CefValue that)
pure virtual

Returns true if this object and |that| object have an equivalent underlying value but are not necessarily the same object.

◆ IsOwned()

virtual bool CefValue::IsOwned ( )
pure virtual

Returns true if the underlying data is owned by another object.

◆ IsReadOnly()

virtual bool CefValue::IsReadOnly ( )
pure virtual

Returns true if the underlying data is read-only.

Some APIs may expose read-only objects.

◆ IsSame()

virtual bool CefValue::IsSame ( CefRefPtr< CefValue that)
pure virtual

Returns true if this object and |that| object have the same underlying data.

If true modifications to this object will also affect |that| object and vice-versa.

◆ IsValid()

virtual bool CefValue::IsValid ( )
pure virtual

Returns true if the underlying data is valid.

This will always be true for simple types. For complex types (binary, dictionary and list) the underlying data may become invalid if owned by another object (e.g. list or dictionary) and that other object is then modified or destroyed. This value object can be re-used by calling Set*() even if the underlying data is invalid.

◆ SetBinary()

virtual bool CefValue::SetBinary ( CefRefPtr< CefBinaryValue value)
pure virtual

Sets the underlying value as type binary.

Returns true if the value was set successfully. This object keeps a reference to |value| and ownership of the underlying data remains unchanged.

◆ SetBool()

virtual bool CefValue::SetBool ( bool  value)
pure virtual

Sets the underlying value as type bool.

Returns true if the value was set successfully.

◆ SetDictionary()

virtual bool CefValue::SetDictionary ( CefRefPtr< CefDictionaryValue value)
pure virtual

Sets the underlying value as type dict.

Returns true if the value was set successfully. This object keeps a reference to |value| and ownership of the underlying data remains unchanged.

◆ SetDouble()

virtual bool CefValue::SetDouble ( double  value)
pure virtual

Sets the underlying value as type double.

Returns true if the value was set successfully.

◆ SetInt()

virtual bool CefValue::SetInt ( int  value)
pure virtual

Sets the underlying value as type int.

Returns true if the value was set successfully.

◆ SetList()

virtual bool CefValue::SetList ( CefRefPtr< CefListValue value)
pure virtual

Sets the underlying value as type list.

Returns true if the value was set successfully. This object keeps a reference to |value| and ownership of the underlying data remains unchanged.

◆ SetNull()

virtual bool CefValue::SetNull ( )
pure virtual

Sets the underlying value as type null.

Returns true if the value was set successfully.

◆ SetString()

virtual bool CefValue::SetString ( const CefString value)
pure virtual

Sets the underlying value as type string.

Returns true if the value was set successfully.


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