600 lines
14 KiB
C++
600 lines
14 KiB
C++
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
// can be found in the LICENSE file.
|
|
//
|
|
// ---------------------------------------------------------------------------
|
|
//
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
// hand only do so within the body of existing method and function
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
// for more information.
|
|
//
|
|
|
|
#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.
|
|
|
|
CefRefPtr<CefListValue> CefListValue::Create() {
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
cef_list_value_t* _retval = cef_list_value_create();
|
|
|
|
// Return type: refptr_same
|
|
return CefListValueCToCpp::Wrap(_retval);
|
|
}
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
bool CefListValueCToCpp::IsValid() {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, is_valid))
|
|
return false;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
int _retval = _struct->is_valid(_struct);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::IsOwned() {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, is_owned))
|
|
return false;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
int _retval = _struct->is_owned(_struct);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::IsReadOnly() {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, is_read_only))
|
|
return false;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
int _retval = _struct->is_read_only(_struct);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::IsSame(CefRefPtr<CefListValue> that) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
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) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
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() {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, copy))
|
|
return NULL;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
cef_list_value_t* _retval = _struct->copy(_struct);
|
|
|
|
// Return type: refptr_same
|
|
return CefListValueCToCpp::Wrap(_retval);
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetSize(size_t size) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_size))
|
|
return false;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
int _retval = _struct->set_size(_struct,
|
|
size);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
size_t CefListValueCToCpp::GetSize() {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_size))
|
|
return 0;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
size_t _retval = _struct->get_size(_struct);
|
|
|
|
// Return type: simple
|
|
return _retval;
|
|
}
|
|
|
|
bool CefListValueCToCpp::Clear() {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, clear))
|
|
return false;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Execute
|
|
int _retval = _struct->clear(_struct);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::Remove(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, remove))
|
|
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;
|
|
|
|
// Execute
|
|
int _retval = _struct->remove(_struct,
|
|
index);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
CefValueType CefListValueCToCpp::GetType(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_type))
|
|
return VTYPE_INVALID;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Verify param: index; type: simple_byval
|
|
DCHECK_GE(index, 0);
|
|
if (index < 0)
|
|
return VTYPE_INVALID;
|
|
|
|
// Execute
|
|
cef_value_type_t _retval = _struct->get_type(_struct,
|
|
index);
|
|
|
|
// Return type: simple
|
|
return _retval;
|
|
}
|
|
|
|
CefRefPtr<CefValue> CefListValueCToCpp::GetValue(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
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) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_bool))
|
|
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;
|
|
|
|
// Execute
|
|
int _retval = _struct->get_bool(_struct,
|
|
index);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
int CefListValueCToCpp::GetInt(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_int))
|
|
return 0;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Verify param: index; type: simple_byval
|
|
DCHECK_GE(index, 0);
|
|
if (index < 0)
|
|
return 0;
|
|
|
|
// Execute
|
|
int _retval = _struct->get_int(_struct,
|
|
index);
|
|
|
|
// Return type: simple
|
|
return _retval;
|
|
}
|
|
|
|
double CefListValueCToCpp::GetDouble(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_double))
|
|
return 0;
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Verify param: index; type: simple_byval
|
|
DCHECK_GE(index, 0);
|
|
if (index < 0)
|
|
return 0;
|
|
|
|
// Execute
|
|
double _retval = _struct->get_double(_struct,
|
|
index);
|
|
|
|
// Return type: simple
|
|
return _retval;
|
|
}
|
|
|
|
CefString CefListValueCToCpp::GetString(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_string))
|
|
return CefString();
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
// Verify param: index; type: simple_byval
|
|
DCHECK_GE(index, 0);
|
|
if (index < 0)
|
|
return CefString();
|
|
|
|
// Execute
|
|
cef_string_userfree_t _retval = _struct->get_string(_struct,
|
|
index);
|
|
|
|
// Return type: string
|
|
CefString _retvalStr;
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
return _retvalStr;
|
|
}
|
|
|
|
CefRefPtr<CefBinaryValue> CefListValueCToCpp::GetBinary(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_binary))
|
|
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_binary_value_t* _retval = _struct->get_binary(_struct,
|
|
index);
|
|
|
|
// Return type: refptr_same
|
|
return CefBinaryValueCToCpp::Wrap(_retval);
|
|
}
|
|
|
|
CefRefPtr<CefDictionaryValue> CefListValueCToCpp::GetDictionary(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_dictionary))
|
|
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_dictionary_value_t* _retval = _struct->get_dictionary(_struct,
|
|
index);
|
|
|
|
// Return type: refptr_same
|
|
return CefDictionaryValueCToCpp::Wrap(_retval);
|
|
}
|
|
|
|
CefRefPtr<CefListValue> CefListValueCToCpp::GetList(int index) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, get_list))
|
|
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_list_value_t* _retval = _struct->get_list(_struct,
|
|
index);
|
|
|
|
// Return type: refptr_same
|
|
return CefListValueCToCpp::Wrap(_retval);
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetValue(int index, CefRefPtr<CefValue> value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
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) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_null))
|
|
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;
|
|
|
|
// Execute
|
|
int _retval = _struct->set_null(_struct,
|
|
index);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetBool(int index, bool value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_bool))
|
|
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;
|
|
|
|
// Execute
|
|
int _retval = _struct->set_bool(_struct,
|
|
index,
|
|
value);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetInt(int index, int value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_int))
|
|
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;
|
|
|
|
// Execute
|
|
int _retval = _struct->set_int(_struct,
|
|
index,
|
|
value);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetDouble(int index, double value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_double))
|
|
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;
|
|
|
|
// Execute
|
|
int _retval = _struct->set_double(_struct,
|
|
index,
|
|
value);
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetString(int index, const CefString& value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_string))
|
|
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;
|
|
// Unverified params: value
|
|
|
|
// Execute
|
|
int _retval = _struct->set_string(_struct,
|
|
index,
|
|
value.GetStruct());
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetBinary(int index, CefRefPtr<CefBinaryValue> value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_binary))
|
|
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_binary(_struct,
|
|
index,
|
|
CefBinaryValueCToCpp::Unwrap(value));
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetDictionary(int index,
|
|
CefRefPtr<CefDictionaryValue> value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_dictionary))
|
|
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_dictionary(_struct,
|
|
index,
|
|
CefDictionaryValueCToCpp::Unwrap(value));
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
bool CefListValueCToCpp::SetList(int index, CefRefPtr<CefListValue> value) {
|
|
cef_list_value_t* _struct = GetStruct();
|
|
if (CEF_MEMBER_MISSING(_struct, set_list))
|
|
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_list(_struct,
|
|
index,
|
|
CefListValueCToCpp::Unwrap(value));
|
|
|
|
// Return type: bool
|
|
return _retval?true:false;
|
|
}
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
CefListValueCToCpp::CefListValueCToCpp() {
|
|
}
|
|
|
|
template<> cef_list_value_t* CefCToCpp<CefListValueCToCpp, CefListValue,
|
|
cef_list_value_t>::UnwrapDerived(CefWrapperType type, CefListValue* c) {
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
return NULL;
|
|
}
|
|
|
|
#ifndef NDEBUG
|
|
template<> base::AtomicRefCount CefCToCpp<CefListValueCToCpp, CefListValue,
|
|
cef_list_value_t>::DebugObjCt = 0;
|
|
#endif
|
|
|
|
template<> CefWrapperType CefCToCpp<CefListValueCToCpp, CefListValue,
|
|
cef_list_value_t>::kWrapperType = WT_LIST_VALUE;
|