- Add CefValue for wrapping various value types in a single object (issue #1607).

- Add IsSame() and IsEqual() methods for comparing CefValue* types.
- Improve CefValue* documentation.
This commit is contained in:
Marshall Greenblatt
2015-04-15 15:45:30 +02:00
parent 740ad72f90
commit 0369063810
23 changed files with 3281 additions and 185 deletions

View File

@@ -13,6 +13,7 @@
#include "libcef_dll/ctocpp/binary_value_ctocpp.h"
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
#include "libcef_dll/ctocpp/value_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
@@ -69,6 +70,44 @@ bool CefListValueCToCpp::IsReadOnly() {
return _retval?true:false;
}
bool CefListValueCToCpp::IsSame(CefRefPtr<CefListValue> that) {
if (CEF_MEMBER_MISSING(struct_, is_same))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: that; type: refptr_same
DCHECK(that.get());
if (!that.get())
return false;
// Execute
int _retval = struct_->is_same(struct_,
CefListValueCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
}
bool CefListValueCToCpp::IsEqual(CefRefPtr<CefListValue> that) {
if (CEF_MEMBER_MISSING(struct_, is_equal))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: that; type: refptr_same
DCHECK(that.get());
if (!that.get())
return false;
// Execute
int _retval = struct_->is_equal(struct_,
CefListValueCToCpp::Unwrap(that));
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefListValue> CefListValueCToCpp::Copy() {
if (CEF_MEMBER_MISSING(struct_, copy))
return NULL;
@@ -160,6 +199,25 @@ CefValueType CefListValueCToCpp::GetType(int index) {
return _retval;
}
CefRefPtr<CefValue> CefListValueCToCpp::GetValue(int index) {
if (CEF_MEMBER_MISSING(struct_, get_value))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
cef_value_t* _retval = struct_->get_value(struct_,
index);
// Return type: refptr_same
return CefValueCToCpp::Wrap(_retval);
}
bool CefListValueCToCpp::GetBool(int index) {
if (CEF_MEMBER_MISSING(struct_, get_bool))
return false;
@@ -295,6 +353,30 @@ CefRefPtr<CefListValue> CefListValueCToCpp::GetList(int index) {
return CefListValueCToCpp::Wrap(_retval);
}
bool CefListValueCToCpp::SetValue(int index, CefRefPtr<CefValue> value) {
if (CEF_MEMBER_MISSING(struct_, set_value))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return false;
// Verify param: value; type: refptr_same
DCHECK(value.get());
if (!value.get())
return false;
// Execute
int _retval = struct_->set_value(struct_,
index,
CefValueCToCpp::Unwrap(value));
// Return type: bool
return _retval?true:false;
}
bool CefListValueCToCpp::SetNull(int index) {
if (CEF_MEMBER_MISSING(struct_, set_null))
return false;