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:
Marshall Greenblatt
2015-04-26 21:40:01 +03:00
parent 4715a1644e
commit 616fdbf3ff
408 changed files with 13269 additions and 4680 deletions

View File

@@ -31,78 +31,84 @@ CefRefPtr<CefDragData> CefDragData::Create() {
// VIRTUAL METHODS - Body may be edited by hand.
CefRefPtr<CefDragData> CefDragDataCToCpp::Clone() {
if (CEF_MEMBER_MISSING(struct_, clone))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, clone))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_drag_data_t* _retval = struct_->clone(struct_);
cef_drag_data_t* _retval = _struct->clone(_struct);
// Return type: refptr_same
return CefDragDataCToCpp::Wrap(_retval);
}
bool CefDragDataCToCpp::IsReadOnly() {
if (CEF_MEMBER_MISSING(struct_, is_read_only))
cef_drag_data_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_);
int _retval = _struct->is_read_only(_struct);
// Return type: bool
return _retval?true:false;
}
bool CefDragDataCToCpp::IsLink() {
if (CEF_MEMBER_MISSING(struct_, is_link))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_link))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_link(struct_);
int _retval = _struct->is_link(_struct);
// Return type: bool
return _retval?true:false;
}
bool CefDragDataCToCpp::IsFragment() {
if (CEF_MEMBER_MISSING(struct_, is_fragment))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_fragment))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_fragment(struct_);
int _retval = _struct->is_fragment(_struct);
// Return type: bool
return _retval?true:false;
}
bool CefDragDataCToCpp::IsFile() {
if (CEF_MEMBER_MISSING(struct_, is_file))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_file))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_file(struct_);
int _retval = _struct->is_file(_struct);
// Return type: bool
return _retval?true:false;
}
CefString CefDragDataCToCpp::GetLinkURL() {
if (CEF_MEMBER_MISSING(struct_, get_link_url))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_link_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_url(struct_);
cef_string_userfree_t _retval = _struct->get_link_url(_struct);
// Return type: string
CefString _retvalStr;
@@ -111,13 +117,14 @@ CefString CefDragDataCToCpp::GetLinkURL() {
}
CefString CefDragDataCToCpp::GetLinkTitle() {
if (CEF_MEMBER_MISSING(struct_, get_link_title))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_link_title))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_title(struct_);
cef_string_userfree_t _retval = _struct->get_link_title(_struct);
// Return type: string
CefString _retvalStr;
@@ -126,13 +133,14 @@ CefString CefDragDataCToCpp::GetLinkTitle() {
}
CefString CefDragDataCToCpp::GetLinkMetadata() {
if (CEF_MEMBER_MISSING(struct_, get_link_metadata))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_link_metadata))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_link_metadata(struct_);
cef_string_userfree_t _retval = _struct->get_link_metadata(_struct);
// Return type: string
CefString _retvalStr;
@@ -141,13 +149,14 @@ CefString CefDragDataCToCpp::GetLinkMetadata() {
}
CefString CefDragDataCToCpp::GetFragmentText() {
if (CEF_MEMBER_MISSING(struct_, get_fragment_text))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_fragment_text))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_fragment_text(struct_);
cef_string_userfree_t _retval = _struct->get_fragment_text(_struct);
// Return type: string
CefString _retvalStr;
@@ -156,13 +165,14 @@ CefString CefDragDataCToCpp::GetFragmentText() {
}
CefString CefDragDataCToCpp::GetFragmentHtml() {
if (CEF_MEMBER_MISSING(struct_, get_fragment_html))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_fragment_html))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_fragment_html(struct_);
cef_string_userfree_t _retval = _struct->get_fragment_html(_struct);
// Return type: string
CefString _retvalStr;
@@ -171,13 +181,14 @@ CefString CefDragDataCToCpp::GetFragmentHtml() {
}
CefString CefDragDataCToCpp::GetFragmentBaseURL() {
if (CEF_MEMBER_MISSING(struct_, get_fragment_base_url))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_fragment_base_url))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_fragment_base_url(struct_);
cef_string_userfree_t _retval = _struct->get_fragment_base_url(_struct);
// Return type: string
CefString _retvalStr;
@@ -186,13 +197,14 @@ CefString CefDragDataCToCpp::GetFragmentBaseURL() {
}
CefString CefDragDataCToCpp::GetFileName() {
if (CEF_MEMBER_MISSING(struct_, get_file_name))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_file_name))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_file_name(struct_);
cef_string_userfree_t _retval = _struct->get_file_name(_struct);
// Return type: string
CefString _retvalStr;
@@ -201,7 +213,8 @@ CefString CefDragDataCToCpp::GetFileName() {
}
size_t CefDragDataCToCpp::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
if (CEF_MEMBER_MISSING(struct_, get_file_contents))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_file_contents))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -209,7 +222,7 @@ size_t CefDragDataCToCpp::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
// Unverified params: writer
// Execute
size_t _retval = struct_->get_file_contents(struct_,
size_t _retval = _struct->get_file_contents(_struct,
CefStreamWriterCToCpp::Unwrap(writer));
// Return type: simple
@@ -217,7 +230,8 @@ size_t CefDragDataCToCpp::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
}
bool CefDragDataCToCpp::GetFileNames(std::vector<CefString>& names) {
if (CEF_MEMBER_MISSING(struct_, get_file_names))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_file_names))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -229,7 +243,7 @@ bool CefDragDataCToCpp::GetFileNames(std::vector<CefString>& names) {
transfer_string_list_contents(names, namesList);
// Execute
int _retval = struct_->get_file_names(struct_,
int _retval = _struct->get_file_names(_struct,
namesList);
// Restore param:names; type: string_vec_byref
@@ -244,7 +258,8 @@ bool CefDragDataCToCpp::GetFileNames(std::vector<CefString>& names) {
}
void CefDragDataCToCpp::SetLinkURL(const CefString& url) {
if (CEF_MEMBER_MISSING(struct_, set_link_url))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_link_url))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -252,12 +267,13 @@ void CefDragDataCToCpp::SetLinkURL(const CefString& url) {
// Unverified params: url
// Execute
struct_->set_link_url(struct_,
_struct->set_link_url(_struct,
url.GetStruct());
}
void CefDragDataCToCpp::SetLinkTitle(const CefString& title) {
if (CEF_MEMBER_MISSING(struct_, set_link_title))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_link_title))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -265,12 +281,13 @@ void CefDragDataCToCpp::SetLinkTitle(const CefString& title) {
// Unverified params: title
// Execute
struct_->set_link_title(struct_,
_struct->set_link_title(_struct,
title.GetStruct());
}
void CefDragDataCToCpp::SetLinkMetadata(const CefString& data) {
if (CEF_MEMBER_MISSING(struct_, set_link_metadata))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_link_metadata))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -278,12 +295,13 @@ void CefDragDataCToCpp::SetLinkMetadata(const CefString& data) {
// Unverified params: data
// Execute
struct_->set_link_metadata(struct_,
_struct->set_link_metadata(_struct,
data.GetStruct());
}
void CefDragDataCToCpp::SetFragmentText(const CefString& text) {
if (CEF_MEMBER_MISSING(struct_, set_fragment_text))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_fragment_text))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -291,12 +309,13 @@ void CefDragDataCToCpp::SetFragmentText(const CefString& text) {
// Unverified params: text
// Execute
struct_->set_fragment_text(struct_,
_struct->set_fragment_text(_struct,
text.GetStruct());
}
void CefDragDataCToCpp::SetFragmentHtml(const CefString& html) {
if (CEF_MEMBER_MISSING(struct_, set_fragment_html))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_fragment_html))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -304,12 +323,13 @@ void CefDragDataCToCpp::SetFragmentHtml(const CefString& html) {
// Unverified params: html
// Execute
struct_->set_fragment_html(struct_,
_struct->set_fragment_html(_struct,
html.GetStruct());
}
void CefDragDataCToCpp::SetFragmentBaseURL(const CefString& base_url) {
if (CEF_MEMBER_MISSING(struct_, set_fragment_base_url))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_fragment_base_url))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -317,23 +337,25 @@ void CefDragDataCToCpp::SetFragmentBaseURL(const CefString& base_url) {
// Unverified params: base_url
// Execute
struct_->set_fragment_base_url(struct_,
_struct->set_fragment_base_url(_struct,
base_url.GetStruct());
}
void CefDragDataCToCpp::ResetFileContents() {
if (CEF_MEMBER_MISSING(struct_, reset_file_contents))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, reset_file_contents))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
struct_->reset_file_contents(struct_);
_struct->reset_file_contents(_struct);
}
void CefDragDataCToCpp::AddFile(const CefString& path,
const CefString& display_name) {
if (CEF_MEMBER_MISSING(struct_, add_file))
cef_drag_data_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, add_file))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -345,14 +367,27 @@ void CefDragDataCToCpp::AddFile(const CefString& path,
// Unverified params: display_name
// Execute
struct_->add_file(struct_,
_struct->add_file(_struct,
path.GetStruct(),
display_name.GetStruct());
}
// CONSTRUCTOR - Do not edit by hand.
CefDragDataCToCpp::CefDragDataCToCpp() {
}
template<> cef_drag_data_t* CefCToCpp<CefDragDataCToCpp, CefDragData,
cef_drag_data_t>::UnwrapDerived(CefWrapperType type, CefDragData* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefDragDataCToCpp, CefDragData,
cef_drag_data_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefDragDataCToCpp, CefDragData,
cef_drag_data_t>::kWrapperType = WT_DRAG_DATA;