mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Improve inheritance support in the CEF API (issue #1623).
- Support single parent inheritance in CEF API classes. - Support non-virtual inheritance in CEF API classes. - Support translation of CEF API sub-directories. - Add test sub-directories for testing-only functionality that will be available to unit tests but not exposed via the binary distribution. - Add unit tests for the translator tool. - Fix parsing of template parameter types that include commas.
This commit is contained in:
@@ -37,33 +37,36 @@ CefRefPtr<CefBinaryValue> CefBinaryValue::Create(const void* data,
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefBinaryValueCToCpp::IsValid() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_valid))
|
||||
cef_binary_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_);
|
||||
int _retval = _struct->is_valid(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefBinaryValueCToCpp::IsOwned() {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_owned))
|
||||
cef_binary_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_);
|
||||
int _retval = _struct->is_owned(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefBinaryValueCToCpp::IsSame(CefRefPtr<CefBinaryValue> that) {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_same))
|
||||
cef_binary_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_same))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -74,7 +77,7 @@ bool CefBinaryValueCToCpp::IsSame(CefRefPtr<CefBinaryValue> that) {
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_same(struct_,
|
||||
int _retval = _struct->is_same(_struct,
|
||||
CefBinaryValueCToCpp::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
@@ -82,7 +85,8 @@ bool CefBinaryValueCToCpp::IsSame(CefRefPtr<CefBinaryValue> that) {
|
||||
}
|
||||
|
||||
bool CefBinaryValueCToCpp::IsEqual(CefRefPtr<CefBinaryValue> that) {
|
||||
if (CEF_MEMBER_MISSING(struct_, is_equal))
|
||||
cef_binary_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, is_equal))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -93,7 +97,7 @@ bool CefBinaryValueCToCpp::IsEqual(CefRefPtr<CefBinaryValue> that) {
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->is_equal(struct_,
|
||||
int _retval = _struct->is_equal(_struct,
|
||||
CefBinaryValueCToCpp::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
@@ -101,26 +105,28 @@ bool CefBinaryValueCToCpp::IsEqual(CefRefPtr<CefBinaryValue> that) {
|
||||
}
|
||||
|
||||
CefRefPtr<CefBinaryValue> CefBinaryValueCToCpp::Copy() {
|
||||
if (CEF_MEMBER_MISSING(struct_, copy))
|
||||
cef_binary_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, copy))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_binary_value_t* _retval = struct_->copy(struct_);
|
||||
cef_binary_value_t* _retval = _struct->copy(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
size_t CefBinaryValueCToCpp::GetSize() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_size))
|
||||
cef_binary_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_);
|
||||
size_t _retval = _struct->get_size(_struct);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
@@ -128,7 +134,8 @@ size_t CefBinaryValueCToCpp::GetSize() {
|
||||
|
||||
size_t CefBinaryValueCToCpp::GetData(void* buffer, size_t buffer_size,
|
||||
size_t data_offset) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_data))
|
||||
cef_binary_value_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_data))
|
||||
return 0;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -139,7 +146,7 @@ size_t CefBinaryValueCToCpp::GetData(void* buffer, size_t buffer_size,
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = struct_->get_data(struct_,
|
||||
size_t _retval = _struct->get_data(_struct,
|
||||
buffer,
|
||||
buffer_size,
|
||||
data_offset);
|
||||
@@ -149,8 +156,22 @@ size_t CefBinaryValueCToCpp::GetData(void* buffer, size_t buffer_size,
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBinaryValueCToCpp::CefBinaryValueCToCpp() {
|
||||
}
|
||||
|
||||
template<> cef_binary_value_t* CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue,
|
||||
cef_binary_value_t>::UnwrapDerived(CefWrapperType type,
|
||||
CefBinaryValue* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue,
|
||||
cef_binary_value_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCToCpp<CefBinaryValueCToCpp, CefBinaryValue,
|
||||
cef_binary_value_t>::kWrapperType = WT_BINARY_VALUE;
|
||||
|
Reference in New Issue
Block a user