Chromium Embedded Framework (CEF)  127.1.0+ga1ec504+chromium-127.0.6533.57
CefDictionaryValue Class Referenceabstract

Class representing a dictionary value. More...

#include "include/cef_values.h"

Inheritance diagram for CefDictionaryValue:
CefBaseRefCounted

Public Types

typedef std::vector< CefStringKeyList
 

Public Member Functions

virtual bool IsValid ()=0
 Returns true if this object is valid. More...
 
virtual bool IsOwned ()=0
 Returns true if this object is currently owned by another object. More...
 
virtual bool IsReadOnly ()=0
 Returns true if the values of this object are read-only. More...
 
virtual bool IsSame (CefRefPtr< CefDictionaryValue > that)=0
 Returns true if this object and |that| object have the same underlying data. More...
 
virtual bool IsEqual (CefRefPtr< CefDictionaryValue > 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< CefDictionaryValueCopy (bool exclude_empty_children)=0
 Returns a writable copy of this object. More...
 
virtual size_t GetSize ()=0
 Returns the number of values. More...
 
virtual bool Clear ()=0
 Removes all values. More...
 
virtual bool HasKey (const CefString &key)=0
 Returns true if the current dictionary has a value for the given key. More...
 
virtual bool GetKeys (KeyList &keys)=0
 Reads all keys for this dictionary into the specified vector. More...
 
virtual bool Remove (const CefString &key)=0
 Removes the value at the specified key. More...
 
virtual CefValueType GetType (const CefString &key)=0
 Returns the value type for the specified key. More...
 
virtual CefRefPtr< CefValueGetValue (const CefString &key)=0
 Returns the value at the specified key. More...
 
virtual bool GetBool (const CefString &key)=0
 Returns the value at the specified key as type bool. More...
 
virtual int GetInt (const CefString &key)=0
 Returns the value at the specified key as type int. More...
 
virtual double GetDouble (const CefString &key)=0
 Returns the value at the specified key as type double. More...
 
virtual CefString GetString (const CefString &key)=0
 Returns the value at the specified key as type string. More...
 
virtual CefRefPtr< CefBinaryValueGetBinary (const CefString &key)=0
 Returns the value at the specified key as type binary. More...
 
virtual CefRefPtr< CefDictionaryValueGetDictionary (const CefString &key)=0
 Returns the value at the specified key as type dictionary. More...
 
virtual CefRefPtr< CefListValueGetList (const CefString &key)=0
 Returns the value at the specified key as type list. More...
 
virtual bool SetValue (const CefString &key, CefRefPtr< CefValue > value)=0
 Sets the value at the specified key. More...
 
virtual bool SetNull (const CefString &key)=0
 Sets the value at the specified key as type null. More...
 
virtual bool SetBool (const CefString &key, bool value)=0
 Sets the value at the specified key as type bool. More...
 
virtual bool SetInt (const CefString &key, int value)=0
 Sets the value at the specified key as type int. More...
 
virtual bool SetDouble (const CefString &key, double value)=0
 Sets the value at the specified key as type double. More...
 
virtual bool SetString (const CefString &key, const CefString &value)=0
 Sets the value at the specified key as type string. More...
 
virtual bool SetBinary (const CefString &key, CefRefPtr< CefBinaryValue > value)=0
 Sets the value at the specified key as type binary. More...
 
virtual bool SetDictionary (const CefString &key, CefRefPtr< CefDictionaryValue > value)=0
 Sets the value at the specified key as type dict. More...
 
virtual bool SetList (const CefString &key, CefRefPtr< CefListValue > value)=0
 Sets the value at the specified key 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< CefDictionaryValueCreate ()
 Creates a new object that is not owned by any other object. More...
 

Additional Inherited Members

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

Detailed Description

Class representing a dictionary value.

Can be used on any process and thread.

Member Typedef Documentation

◆ KeyList

typedef std::vector<CefString> CefDictionaryValue::KeyList

Member Function Documentation

◆ Clear()

virtual bool CefDictionaryValue::Clear ( )
pure virtual

Removes all values.

Returns true on success.

◆ Copy()

virtual CefRefPtr<CefDictionaryValue> CefDictionaryValue::Copy ( bool  exclude_empty_children)
pure virtual

Returns a writable copy of this object.

If |exclude_empty_children| is true any empty dictionaries or lists will be excluded from the copy.

◆ Create()

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

Creates a new object that is not owned by any other object.

◆ GetBinary()

virtual CefRefPtr<CefBinaryValue> CefDictionaryValue::GetBinary ( const CefString key)
pure virtual

Returns the value at the specified key as type binary.

The returned value will reference existing data.

◆ GetBool()

virtual bool CefDictionaryValue::GetBool ( const CefString key)
pure virtual

Returns the value at the specified key as type bool.

◆ GetDictionary()

virtual CefRefPtr<CefDictionaryValue> CefDictionaryValue::GetDictionary ( const CefString key)
pure virtual

Returns the value at the specified key as type dictionary.

The returned value will reference existing data and modifications to the value will modify this object.

◆ GetDouble()

virtual double CefDictionaryValue::GetDouble ( const CefString key)
pure virtual

Returns the value at the specified key as type double.

◆ GetInt()

virtual int CefDictionaryValue::GetInt ( const CefString key)
pure virtual

Returns the value at the specified key as type int.

◆ GetKeys()

virtual bool CefDictionaryValue::GetKeys ( KeyList keys)
pure virtual

Reads all keys for this dictionary into the specified vector.

◆ GetList()

virtual CefRefPtr<CefListValue> CefDictionaryValue::GetList ( const CefString key)
pure virtual

Returns the value at the specified key as type list.

The returned value will reference existing data and modifications to the value will modify this object.

◆ GetSize()

virtual size_t CefDictionaryValue::GetSize ( )
pure virtual

Returns the number of values.

◆ GetString()

virtual CefString CefDictionaryValue::GetString ( const CefString key)
pure virtual

Returns the value at the specified key as type string.

◆ GetType()

virtual CefValueType CefDictionaryValue::GetType ( const CefString key)
pure virtual

Returns the value type for the specified key.

◆ GetValue()

virtual CefRefPtr<CefValue> CefDictionaryValue::GetValue ( const CefString key)
pure virtual

Returns the value at the specified key.

For simple types the returned value will copy existing data and modifications to the value will not modify this object. For complex types (binary, dictionary and list) the returned value will reference existing data and modifications to the value will modify this object.

◆ HasKey()

virtual bool CefDictionaryValue::HasKey ( const CefString key)
pure virtual

Returns true if the current dictionary has a value for the given key.

◆ IsEqual()

virtual bool CefDictionaryValue::IsEqual ( CefRefPtr< CefDictionaryValue 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 CefDictionaryValue::IsOwned ( )
pure virtual

Returns true if this object is currently owned by another object.

◆ IsReadOnly()

virtual bool CefDictionaryValue::IsReadOnly ( )
pure virtual

Returns true if the values of this object are read-only.

Some APIs may expose read-only objects.

◆ IsSame()

virtual bool CefDictionaryValue::IsSame ( CefRefPtr< CefDictionaryValue 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 CefDictionaryValue::IsValid ( )
pure virtual

Returns true if this object is valid.

This object may become invalid if the underlying data is owned by another object (e.g. list or dictionary) and that other object is then modified or destroyed. Do not call any other methods if this method returns false.

◆ Remove()

virtual bool CefDictionaryValue::Remove ( const CefString key)
pure virtual

Removes the value at the specified key.

Returns true is the value was removed successfully.

◆ SetBinary()

virtual bool CefDictionaryValue::SetBinary ( const CefString key,
CefRefPtr< CefBinaryValue value 
)
pure virtual

Sets the value at the specified key as type binary.

Returns true if the value was set successfully. If |value| is currently owned by another object then the value will be copied and the |value| reference will not change. Otherwise, ownership will be transferred to this object and the |value| reference will be invalidated.

◆ SetBool()

virtual bool CefDictionaryValue::SetBool ( const CefString key,
bool  value 
)
pure virtual

Sets the value at the specified key as type bool.

Returns true if the value was set successfully.

◆ SetDictionary()

virtual bool CefDictionaryValue::SetDictionary ( const CefString key,
CefRefPtr< CefDictionaryValue value 
)
pure virtual

Sets the value at the specified key as type dict.

Returns true if the value was set successfully. If |value| is currently owned by another object then the value will be copied and the |value| reference will not change. Otherwise, ownership will be transferred to this object and the |value| reference will be invalidated.

◆ SetDouble()

virtual bool CefDictionaryValue::SetDouble ( const CefString key,
double  value 
)
pure virtual

Sets the value at the specified key as type double.

Returns true if the value was set successfully.

◆ SetInt()

virtual bool CefDictionaryValue::SetInt ( const CefString key,
int  value 
)
pure virtual

Sets the value at the specified key as type int.

Returns true if the value was set successfully.

◆ SetList()

virtual bool CefDictionaryValue::SetList ( const CefString key,
CefRefPtr< CefListValue value 
)
pure virtual

Sets the value at the specified key as type list.

Returns true if the value was set successfully. If |value| is currently owned by another object then the value will be copied and the |value| reference will not change. Otherwise, ownership will be transferred to this object and the |value| reference will be invalidated.

◆ SetNull()

virtual bool CefDictionaryValue::SetNull ( const CefString key)
pure virtual

Sets the value at the specified key as type null.

Returns true if the value was set successfully.

◆ SetString()

virtual bool CefDictionaryValue::SetString ( const CefString key,
const CefString value 
)
pure virtual

Sets the value at the specified key as type string.

Returns true if the value was set successfully.

◆ SetValue()

virtual bool CefDictionaryValue::SetValue ( const CefString key,
CefRefPtr< CefValue value 
)
pure virtual

Sets the value at the specified key.

Returns true if the value was set successfully. If |value| represents simple data then the underlying data will be copied and modifications to |value| will not modify this object. If |value| represents complex data (binary, dictionary or list) then the underlying data will be referenced and modifications to |value| will modify this object.


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