Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@ -9,20 +9,21 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=dd909074a7d2032d5fbc4a700dfaecf00a198f42$
//
#include <algorithm>
#include "libcef_dll/cpptoc/test/translator_test_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_t* cef_translator_test_create() {
@ -35,13 +36,12 @@ CEF_EXPORT cef_translator_test_t* cef_translator_test_create() {
return CefTranslatorTestCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK translator_test_get_void(
struct _cef_translator_test_t* self) {
void CEF_CALLBACK
translator_test_get_void(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -80,8 +80,8 @@ int CEF_CALLBACK translator_test_get_int(struct _cef_translator_test_t* self) {
return _retval;
}
double CEF_CALLBACK translator_test_get_double(
struct _cef_translator_test_t* self) {
double CEF_CALLBACK
translator_test_get_double(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -95,8 +95,8 @@ double CEF_CALLBACK translator_test_get_double(
return _retval;
}
long CEF_CALLBACK translator_test_get_long(
struct _cef_translator_test_t* self) {
long CEF_CALLBACK
translator_test_get_long(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -110,8 +110,8 @@ long CEF_CALLBACK translator_test_get_long(
return _retval;
}
size_t CEF_CALLBACK translator_test_get_sizet(
struct _cef_translator_test_t* self) {
size_t CEF_CALLBACK
translator_test_get_sizet(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -140,7 +140,7 @@ int CEF_CALLBACK translator_test_set_void(struct _cef_translator_test_t* self) {
}
int CEF_CALLBACK translator_test_set_bool(struct _cef_translator_test_t* self,
int val) {
int val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -148,15 +148,15 @@ int CEF_CALLBACK translator_test_set_bool(struct _cef_translator_test_t* self,
return 0;
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetBool(
val?true:false);
bool _retval =
CefTranslatorTestCppToC::Get(self)->SetBool(val ? true : false);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_set_int(struct _cef_translator_test_t* self,
int val) {
int val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -164,15 +164,14 @@ int CEF_CALLBACK translator_test_set_int(struct _cef_translator_test_t* self,
return 0;
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetInt(
val);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetInt(val);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_set_double(struct _cef_translator_test_t* self,
double val) {
double val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -180,15 +179,14 @@ int CEF_CALLBACK translator_test_set_double(struct _cef_translator_test_t* self,
return 0;
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetDouble(
val);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetDouble(val);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_set_long(struct _cef_translator_test_t* self,
long val) {
long val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -196,15 +194,14 @@ int CEF_CALLBACK translator_test_set_long(struct _cef_translator_test_t* self,
return 0;
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetLong(
val);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetLong(val);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_set_sizet(struct _cef_translator_test_t* self,
size_t val) {
size_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -212,15 +209,16 @@ int CEF_CALLBACK translator_test_set_sizet(struct _cef_translator_test_t* self,
return 0;
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetSizet(
val);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetSizet(val);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_set_int_list(
struct _cef_translator_test_t* self, size_t valCount, int const* val) {
int CEF_CALLBACK
translator_test_set_int_list(struct _cef_translator_test_t* self,
size_t valCount,
int const* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -232,7 +230,7 @@ int CEF_CALLBACK translator_test_set_int_list(
return 0;
// Translate param: val; type: simple_vec_byref_const
std::vector<int > valList;
std::vector<int> valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
int valVal = val[i];
@ -241,15 +239,16 @@ int CEF_CALLBACK translator_test_set_int_list(
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetIntList(
valList);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetIntList(valList);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_int_list_by_ref(
struct _cef_translator_test_t* self, size_t* valCount, int* val) {
int CEF_CALLBACK
translator_test_get_int_list_by_ref(struct _cef_translator_test_t* self,
size_t* valCount,
int* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -261,7 +260,7 @@ int CEF_CALLBACK translator_test_get_int_list_by_ref(
return 0;
// Translate param: val; type: simple_vec_byref
std::vector<int > valList;
std::vector<int> valList;
if (valCount && *valCount > 0 && val) {
for (size_t i = 0; i < *valCount; ++i) {
valList.push_back(val[i]);
@ -269,8 +268,7 @@ int CEF_CALLBACK translator_test_get_int_list_by_ref(
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetIntListByRef(
valList);
bool _retval = CefTranslatorTestCppToC::Get(self)->GetIntListByRef(valList);
// Restore param: val; type: simple_vec_byref
if (valCount && val) {
@ -286,8 +284,8 @@ int CEF_CALLBACK translator_test_get_int_list_by_ref(
return _retval;
}
size_t CEF_CALLBACK translator_test_get_int_list_size(
struct _cef_translator_test_t* self) {
size_t CEF_CALLBACK
translator_test_get_int_list_size(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -301,8 +299,8 @@ size_t CEF_CALLBACK translator_test_get_int_list_size(
return _retval;
}
cef_string_userfree_t CEF_CALLBACK translator_test_get_string(
struct _cef_translator_test_t* self) {
cef_string_userfree_t CEF_CALLBACK
translator_test_get_string(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -317,7 +315,7 @@ cef_string_userfree_t CEF_CALLBACK translator_test_get_string(
}
int CEF_CALLBACK translator_test_set_string(struct _cef_translator_test_t* self,
const cef_string_t* val) {
const cef_string_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -329,15 +327,15 @@ int CEF_CALLBACK translator_test_set_string(struct _cef_translator_test_t* self,
return 0;
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetString(
CefString(val));
bool _retval = CefTranslatorTestCppToC::Get(self)->SetString(CefString(val));
// Return type: bool
return _retval;
}
void CEF_CALLBACK translator_test_get_string_by_ref(
struct _cef_translator_test_t* self, cef_string_t* val) {
void CEF_CALLBACK
translator_test_get_string_by_ref(struct _cef_translator_test_t* self,
cef_string_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -352,12 +350,12 @@ void CEF_CALLBACK translator_test_get_string_by_ref(
CefString valStr(val);
// Execute
CefTranslatorTestCppToC::Get(self)->GetStringByRef(
valStr);
CefTranslatorTestCppToC::Get(self)->GetStringByRef(valStr);
}
int CEF_CALLBACK translator_test_set_string_list(
struct _cef_translator_test_t* self, cef_string_list_t val) {
int CEF_CALLBACK
translator_test_set_string_list(struct _cef_translator_test_t* self,
cef_string_list_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -373,15 +371,15 @@ int CEF_CALLBACK translator_test_set_string_list(
transfer_string_list_contents(val, valList);
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetStringList(
valList);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetStringList(valList);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_string_list_by_ref(
struct _cef_translator_test_t* self, cef_string_list_t val) {
int CEF_CALLBACK
translator_test_get_string_list_by_ref(struct _cef_translator_test_t* self,
cef_string_list_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -397,8 +395,8 @@ int CEF_CALLBACK translator_test_get_string_list_by_ref(
transfer_string_list_contents(val, valList);
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetStringListByRef(
valList);
bool _retval =
CefTranslatorTestCppToC::Get(self)->GetStringListByRef(valList);
// Restore param: val; type: string_vec_byref
cef_string_list_clear(val);
@ -408,8 +406,9 @@ int CEF_CALLBACK translator_test_get_string_list_by_ref(
return _retval;
}
int CEF_CALLBACK translator_test_set_string_map(
struct _cef_translator_test_t* self, cef_string_map_t val) {
int CEF_CALLBACK
translator_test_set_string_map(struct _cef_translator_test_t* self,
cef_string_map_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -425,15 +424,15 @@ int CEF_CALLBACK translator_test_set_string_map(
transfer_string_map_contents(val, valMap);
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetStringMap(
valMap);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetStringMap(valMap);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_string_map_by_ref(
struct _cef_translator_test_t* self, cef_string_map_t val) {
int CEF_CALLBACK
translator_test_get_string_map_by_ref(struct _cef_translator_test_t* self,
cef_string_map_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -449,8 +448,7 @@ int CEF_CALLBACK translator_test_get_string_map_by_ref(
transfer_string_map_contents(val, valMap);
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetStringMapByRef(
valMap);
bool _retval = CefTranslatorTestCppToC::Get(self)->GetStringMapByRef(valMap);
// Restore param: val; type: string_map_single_byref
cef_string_map_clear(val);
@ -460,8 +458,9 @@ int CEF_CALLBACK translator_test_get_string_map_by_ref(
return _retval;
}
int CEF_CALLBACK translator_test_set_string_multimap(
struct _cef_translator_test_t* self, cef_string_multimap_t val) {
int CEF_CALLBACK
translator_test_set_string_multimap(struct _cef_translator_test_t* self,
cef_string_multimap_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -477,15 +476,16 @@ int CEF_CALLBACK translator_test_set_string_multimap(
transfer_string_multimap_contents(val, valMultimap);
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetStringMultimap(
valMultimap);
bool _retval =
CefTranslatorTestCppToC::Get(self)->SetStringMultimap(valMultimap);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_string_multimap_by_ref(
struct _cef_translator_test_t* self, cef_string_multimap_t val) {
int CEF_CALLBACK
translator_test_get_string_multimap_by_ref(struct _cef_translator_test_t* self,
cef_string_multimap_t val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -501,8 +501,8 @@ int CEF_CALLBACK translator_test_get_string_multimap_by_ref(
transfer_string_multimap_contents(val, valMultimap);
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetStringMultimapByRef(
valMultimap);
bool _retval =
CefTranslatorTestCppToC::Get(self)->GetStringMultimapByRef(valMultimap);
// Restore param: val; type: string_map_multi_byref
cef_string_multimap_clear(val);
@ -512,8 +512,8 @@ int CEF_CALLBACK translator_test_get_string_multimap_by_ref(
return _retval;
}
cef_point_t CEF_CALLBACK translator_test_get_point(
struct _cef_translator_test_t* self) {
cef_point_t CEF_CALLBACK
translator_test_get_point(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -528,7 +528,7 @@ cef_point_t CEF_CALLBACK translator_test_get_point(
}
int CEF_CALLBACK translator_test_set_point(struct _cef_translator_test_t* self,
const cef_point_t* val) {
const cef_point_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -540,18 +540,18 @@ int CEF_CALLBACK translator_test_set_point(struct _cef_translator_test_t* self,
return 0;
// Translate param: val; type: simple_byref_const
CefPoint valVal = val?*val:CefPoint();
CefPoint valVal = val ? *val : CefPoint();
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetPoint(
valVal);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetPoint(valVal);
// Return type: bool
return _retval;
}
void CEF_CALLBACK translator_test_get_point_by_ref(
struct _cef_translator_test_t* self, cef_point_t* val) {
void CEF_CALLBACK
translator_test_get_point_by_ref(struct _cef_translator_test_t* self,
cef_point_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -563,20 +563,20 @@ void CEF_CALLBACK translator_test_get_point_by_ref(
return;
// Translate param: val; type: simple_byref
CefPoint valVal = val?*val:CefPoint();
CefPoint valVal = val ? *val : CefPoint();
// Execute
CefTranslatorTestCppToC::Get(self)->GetPointByRef(
valVal);
CefTranslatorTestCppToC::Get(self)->GetPointByRef(valVal);
// Restore param: val; type: simple_byref
if (val)
*val = valVal;
}
int CEF_CALLBACK translator_test_set_point_list(
struct _cef_translator_test_t* self, size_t valCount,
cef_point_t const* val) {
int CEF_CALLBACK
translator_test_set_point_list(struct _cef_translator_test_t* self,
size_t valCount,
cef_point_t const* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -588,7 +588,7 @@ int CEF_CALLBACK translator_test_set_point_list(
return 0;
// Translate param: val; type: simple_vec_byref_const
std::vector<CefPoint > valList;
std::vector<CefPoint> valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefPoint valVal = val[i];
@ -597,15 +597,16 @@ int CEF_CALLBACK translator_test_set_point_list(
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetPointList(
valList);
bool _retval = CefTranslatorTestCppToC::Get(self)->SetPointList(valList);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_point_list_by_ref(
struct _cef_translator_test_t* self, size_t* valCount, cef_point_t* val) {
int CEF_CALLBACK
translator_test_get_point_list_by_ref(struct _cef_translator_test_t* self,
size_t* valCount,
cef_point_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -617,7 +618,7 @@ int CEF_CALLBACK translator_test_get_point_list_by_ref(
return 0;
// Translate param: val; type: simple_vec_byref
std::vector<CefPoint > valList;
std::vector<CefPoint> valList;
if (valCount && *valCount > 0 && val) {
for (size_t i = 0; i < *valCount; ++i) {
valList.push_back(val[i]);
@ -625,8 +626,7 @@ int CEF_CALLBACK translator_test_get_point_list_by_ref(
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetPointListByRef(
valList);
bool _retval = CefTranslatorTestCppToC::Get(self)->GetPointListByRef(valList);
// Restore param: val; type: simple_vec_byref
if (valCount && val) {
@ -642,8 +642,8 @@ int CEF_CALLBACK translator_test_get_point_list_by_ref(
return _retval;
}
size_t CEF_CALLBACK translator_test_get_point_list_size(
struct _cef_translator_test_t* self) {
size_t CEF_CALLBACK
translator_test_get_point_list_size(struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -657,8 +657,9 @@ size_t CEF_CALLBACK translator_test_get_point_list_size(
return _retval;
}
struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK translator_test_get_ref_ptr_library(
struct _cef_translator_test_t* self, int val) {
struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK
translator_test_get_ref_ptr_library(struct _cef_translator_test_t* self,
int val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -667,8 +668,7 @@ struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK translator_test_get_
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->GetRefPtrLibrary(
val);
CefTranslatorTestCppToC::Get(self)->GetRefPtrLibrary(val);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
@ -695,7 +695,8 @@ int CEF_CALLBACK translator_test_set_ref_ptr_library(
return _retval;
}
struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK translator_test_set_ref_ptr_library_and_return(
struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK
translator_test_set_ref_ptr_library_and_return(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -711,7 +712,7 @@ struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK translator_test_set_
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetRefPtrLibraryAndReturn(
CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val));
CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val));
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
@ -738,7 +739,8 @@ int CEF_CALLBACK translator_test_set_child_ref_ptr_library(
return _retval;
}
struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK translator_test_set_child_ref_ptr_library_and_return_parent(
struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK
translator_test_set_child_ref_ptr_library_and_return_parent(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -754,15 +756,17 @@ struct _cef_translator_test_ref_ptr_library_t* CEF_CALLBACK translator_test_set_
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildRefPtrLibraryAndReturnParent(
CefTranslatorTestRefPtrLibraryChildCppToC::Unwrap(val));
CefTranslatorTestRefPtrLibraryChildCppToC::Unwrap(val));
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
}
int CEF_CALLBACK translator_test_set_ref_ptr_library_list(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_ref_ptr_library_t* const* val, int val1,
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_ref_ptr_library_t* const* val,
int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -775,7 +779,7 @@ int CEF_CALLBACK translator_test_set_ref_ptr_library_list(
return 0;
// Translate param: val; type: refptr_vec_same_byref_const
std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>> valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRefPtr<CefTranslatorTestRefPtrLibrary> valVal =
@ -786,17 +790,18 @@ int CEF_CALLBACK translator_test_set_ref_ptr_library_list(
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRefPtrLibraryList(
valList,
val1,
val2);
valList, val1, val2);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_ref_ptr_library_list_by_ref(
struct _cef_translator_test_t* self, size_t* valCount,
struct _cef_translator_test_ref_ptr_library_t** val, int val1, int val2) {
struct _cef_translator_test_t* self,
size_t* valCount,
struct _cef_translator_test_ref_ptr_library_t** val,
int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -808,7 +813,7 @@ int CEF_CALLBACK translator_test_get_ref_ptr_library_list_by_ref(
return 0;
// Translate param: val; type: refptr_vec_same_byref
std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>> valList;
if (valCount && *valCount > 0 && val) {
for (size_t i = 0; i < *valCount; ++i) {
valList.push_back(CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val[i]));
@ -817,9 +822,7 @@ int CEF_CALLBACK translator_test_get_ref_ptr_library_list_by_ref(
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrLibraryListByRef(
valList,
val1,
val2);
valList, val1, val2);
// Restore param: val; type: refptr_vec_same_byref
if (valCount && val) {
@ -844,8 +847,8 @@ size_t CEF_CALLBACK translator_test_get_ref_ptr_library_list_size(
return 0;
// Execute
size_t _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrLibraryListSize(
);
size_t _retval =
CefTranslatorTestCppToC::Get(self)->GetRefPtrLibraryListSize();
// Return type: simple
return _retval;
@ -872,7 +875,8 @@ int CEF_CALLBACK translator_test_set_ref_ptr_client(
return _retval;
}
struct _cef_translator_test_ref_ptr_client_t* CEF_CALLBACK translator_test_set_ref_ptr_client_and_return(
struct _cef_translator_test_ref_ptr_client_t* CEF_CALLBACK
translator_test_set_ref_ptr_client_and_return(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -888,7 +892,7 @@ struct _cef_translator_test_ref_ptr_client_t* CEF_CALLBACK translator_test_set_r
// Execute
CefRefPtr<CefTranslatorTestRefPtrClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetRefPtrClientAndReturn(
CefTranslatorTestRefPtrClientCToCpp::Wrap(val));
CefTranslatorTestRefPtrClientCToCpp::Wrap(val));
// Return type: refptr_diff
return CefTranslatorTestRefPtrClientCToCpp::Unwrap(_retval);
@ -915,7 +919,8 @@ int CEF_CALLBACK translator_test_set_child_ref_ptr_client(
return _retval;
}
struct _cef_translator_test_ref_ptr_client_t* CEF_CALLBACK translator_test_set_child_ref_ptr_client_and_return_parent(
struct _cef_translator_test_ref_ptr_client_t* CEF_CALLBACK
translator_test_set_child_ref_ptr_client_and_return_parent(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -931,15 +936,17 @@ struct _cef_translator_test_ref_ptr_client_t* CEF_CALLBACK translator_test_set_c
// Execute
CefRefPtr<CefTranslatorTestRefPtrClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildRefPtrClientAndReturnParent(
CefTranslatorTestRefPtrClientChildCToCpp::Wrap(val));
CefTranslatorTestRefPtrClientChildCToCpp::Wrap(val));
// Return type: refptr_diff
return CefTranslatorTestRefPtrClientCToCpp::Unwrap(_retval);
}
int CEF_CALLBACK translator_test_set_ref_ptr_client_list(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_ref_ptr_client_t* const* val, int val1,
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_ref_ptr_client_t* const* val,
int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -952,7 +959,7 @@ int CEF_CALLBACK translator_test_set_ref_ptr_client_list(
return 0;
// Translate param: val; type: refptr_vec_diff_byref_const
std::vector<CefRefPtr<CefTranslatorTestRefPtrClient> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>> valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRefPtr<CefTranslatorTestRefPtrClient> valVal =
@ -963,16 +970,15 @@ int CEF_CALLBACK translator_test_set_ref_ptr_client_list(
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRefPtrClientList(
valList,
val1,
val2);
valList, val1, val2);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_get_ref_ptr_client_list_by_ref(
struct _cef_translator_test_t* self, size_t* valCount,
struct _cef_translator_test_t* self,
size_t* valCount,
struct _cef_translator_test_ref_ptr_client_t** val,
struct _cef_translator_test_ref_ptr_client_t* val1,
struct _cef_translator_test_ref_ptr_client_t* val2) {
@ -995,7 +1001,7 @@ int CEF_CALLBACK translator_test_get_ref_ptr_client_list_by_ref(
return 0;
// Translate param: val; type: refptr_vec_diff_byref
std::vector<CefRefPtr<CefTranslatorTestRefPtrClient> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>> valList;
if (valCount && *valCount > 0 && val) {
for (size_t i = 0; i < *valCount; ++i) {
valList.push_back(CefTranslatorTestRefPtrClientCToCpp::Wrap(val[i]));
@ -1004,8 +1010,7 @@ int CEF_CALLBACK translator_test_get_ref_ptr_client_list_by_ref(
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrClientListByRef(
valList,
CefTranslatorTestRefPtrClientCToCpp::Wrap(val1),
valList, CefTranslatorTestRefPtrClientCToCpp::Wrap(val1),
CefTranslatorTestRefPtrClientCToCpp::Wrap(val2));
// Restore param: val; type: refptr_vec_diff_byref
@ -1031,15 +1036,16 @@ size_t CEF_CALLBACK translator_test_get_ref_ptr_client_list_size(
return 0;
// Execute
size_t _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrClientListSize(
);
size_t _retval =
CefTranslatorTestCppToC::Get(self)->GetRefPtrClientListSize();
// Return type: simple
return _retval;
}
struct _cef_translator_test_scoped_library_t* CEF_CALLBACK translator_test_get_own_ptr_library(
struct _cef_translator_test_t* self, int val) {
struct _cef_translator_test_scoped_library_t* CEF_CALLBACK
translator_test_get_own_ptr_library(struct _cef_translator_test_t* self,
int val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -1048,8 +1054,7 @@ struct _cef_translator_test_scoped_library_t* CEF_CALLBACK translator_test_get_o
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->GetOwnPtrLibrary(
val);
CefTranslatorTestCppToC::Get(self)->GetOwnPtrLibrary(val);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
@ -1076,7 +1081,8 @@ int CEF_CALLBACK translator_test_set_own_ptr_library(
return _retval;
}
struct _cef_translator_test_scoped_library_t* CEF_CALLBACK translator_test_set_own_ptr_library_and_return(
struct _cef_translator_test_scoped_library_t* CEF_CALLBACK
translator_test_set_own_ptr_library_and_return(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1092,7 +1098,7 @@ struct _cef_translator_test_scoped_library_t* CEF_CALLBACK translator_test_set_o
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetOwnPtrLibraryAndReturn(
CefTranslatorTestScopedLibraryCppToC::UnwrapOwn(val));
CefTranslatorTestScopedLibraryCppToC::UnwrapOwn(val));
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
@ -1119,7 +1125,8 @@ int CEF_CALLBACK translator_test_set_child_own_ptr_library(
return _retval;
}
struct _cef_translator_test_scoped_library_t* CEF_CALLBACK translator_test_set_child_own_ptr_library_and_return_parent(
struct _cef_translator_test_scoped_library_t* CEF_CALLBACK
translator_test_set_child_own_ptr_library_and_return_parent(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1135,7 +1142,7 @@ struct _cef_translator_test_scoped_library_t* CEF_CALLBACK translator_test_set_c
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildOwnPtrLibraryAndReturnParent(
CefTranslatorTestScopedLibraryChildCppToC::UnwrapOwn(val));
CefTranslatorTestScopedLibraryChildCppToC::UnwrapOwn(val));
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
@ -1159,14 +1166,15 @@ int CEF_CALLBACK translator_test_set_own_ptr_client(
CefTranslatorTestScopedClientCToCpp::Wrap(val));
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetOwnPtrClient(
OWN_PASS(valPtr));
int _retval =
CefTranslatorTestCppToC::Get(self)->SetOwnPtrClient(OWN_PASS(valPtr));
// Return type: simple
return _retval;
}
struct _cef_translator_test_scoped_client_t* CEF_CALLBACK translator_test_set_own_ptr_client_and_return(
struct _cef_translator_test_scoped_client_t* CEF_CALLBACK
translator_test_set_own_ptr_client_and_return(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1186,7 +1194,7 @@ struct _cef_translator_test_scoped_client_t* CEF_CALLBACK translator_test_set_ow
// Execute
CefOwnPtr<CefTranslatorTestScopedClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetOwnPtrClientAndReturn(
OWN_PASS(valPtr));
OWN_PASS(valPtr));
// Return type: ownptr_diff
return CefTranslatorTestScopedClientCToCpp::UnwrapOwn(OWN_PASS(_retval));
@ -1217,7 +1225,8 @@ int CEF_CALLBACK translator_test_set_child_own_ptr_client(
return _retval;
}
struct _cef_translator_test_scoped_client_t* CEF_CALLBACK translator_test_set_child_own_ptr_client_and_return_parent(
struct _cef_translator_test_scoped_client_t* CEF_CALLBACK
translator_test_set_child_own_ptr_client_and_return_parent(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1237,7 +1246,7 @@ struct _cef_translator_test_scoped_client_t* CEF_CALLBACK translator_test_set_ch
// Execute
CefOwnPtr<CefTranslatorTestScopedClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildOwnPtrClientAndReturnParent(
OWN_PASS(valPtr));
OWN_PASS(valPtr));
// Return type: ownptr_diff
return CefTranslatorTestScopedClientCToCpp::UnwrapOwn(OWN_PASS(_retval));
@ -1286,8 +1295,10 @@ int CEF_CALLBACK translator_test_set_child_raw_ptr_library(
}
int CEF_CALLBACK translator_test_set_raw_ptr_library_list(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_scoped_library_t* const* val, int val1,
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_scoped_library_t* const* val,
int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1300,7 +1311,7 @@ int CEF_CALLBACK translator_test_set_raw_ptr_library_list(
return 0;
// Translate param: val; type: rawptr_vec_same_byref_const
std::vector<CefRawPtr<CefTranslatorTestScopedLibrary> > valList;
std::vector<CefRawPtr<CefTranslatorTestScopedLibrary>> valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRawPtr<CefTranslatorTestScopedLibrary> valVal =
@ -1311,9 +1322,7 @@ int CEF_CALLBACK translator_test_set_raw_ptr_library_list(
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrLibraryList(
valList,
val1,
val2);
valList, val1, val2);
// Return type: bool
return _retval;
@ -1337,8 +1346,8 @@ int CEF_CALLBACK translator_test_set_raw_ptr_client(
CefTranslatorTestScopedClientCToCpp::Wrap(val));
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrClient(
valPtr.get());
int _retval =
CefTranslatorTestCppToC::Get(self)->SetRawPtrClient(valPtr.get());
// Return type: simple
return _retval;
@ -1362,16 +1371,18 @@ int CEF_CALLBACK translator_test_set_child_raw_ptr_client(
CefTranslatorTestScopedClientChildCToCpp::Wrap(val));
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildRawPtrClient(
valPtr.get());
int _retval =
CefTranslatorTestCppToC::Get(self)->SetChildRawPtrClient(valPtr.get());
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_set_raw_ptr_client_list(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_scoped_client_t* const* val, int val1,
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_scoped_client_t* const* val,
int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1384,7 +1395,7 @@ int CEF_CALLBACK translator_test_set_raw_ptr_client_list(
return 0;
// Translate param: val; type: rawptr_vec_diff_byref_const
std::vector<CefRawPtr<CefTranslatorTestScopedClient> > valList;
std::vector<CefRawPtr<CefTranslatorTestScopedClient>> valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRawPtr<CefTranslatorTestScopedClient> valVal =
@ -1395,9 +1406,7 @@ int CEF_CALLBACK translator_test_set_raw_ptr_client_list(
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrClientList(
valList,
val1,
val2);
valList, val1, val2);
// Restore param: val; type: rawptr_vec_diff_byref_const
if (valCount > 0) {
@ -1412,7 +1421,6 @@ int CEF_CALLBACK translator_test_set_raw_ptr_client_list(
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestCppToC::CefTranslatorTestCppToC() {
@ -1501,18 +1509,25 @@ CefTranslatorTestCppToC::CefTranslatorTestCppToC() {
translator_test_set_raw_ptr_client_list;
}
template<> CefRefPtr<CefTranslatorTest> CefCppToCRefCounted<CefTranslatorTestCppToC,
CefTranslatorTest, cef_translator_test_t>::UnwrapDerived(
CefWrapperType type, cef_translator_test_t* s) {
template <>
CefRefPtr<CefTranslatorTest> CefCppToCRefCounted<
CefTranslatorTestCppToC,
CefTranslatorTest,
cef_translator_test_t>::UnwrapDerived(CefWrapperType type,
cef_translator_test_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestCppToC,
CefTranslatorTest, cef_translator_test_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestCppToC,
CefTranslatorTest,
cef_translator_test_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefTranslatorTestCppToC,
CefTranslatorTest, cef_translator_test_t>::kWrapperType =
template <>
CefWrapperType CefCppToCRefCounted<CefTranslatorTestCppToC,
CefTranslatorTest,
cef_translator_test_t>::kWrapperType =
WT_TRANSLATOR_TEST;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=463e1b14cb01fd52e1b20e3fcb3d9e055c90ff93$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_CPPTOC_H_
@ -18,15 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestCppToC
: public CefCppToCRefCounted<CefTranslatorTestCppToC, CefTranslatorTest,
cef_translator_test_t> {
: public CefCppToCRefCounted<CefTranslatorTestCppToC,
CefTranslatorTest,
cef_translator_test_t> {
public:
CefTranslatorTestCppToC();
};

View File

@ -9,10 +9,11 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2d4f7b4eba0e67faa616e91a591872d7ca5c9902$
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
@ -26,8 +27,8 @@ int CEF_CALLBACK translator_test_ref_ptr_client_child_get_other_value(
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrClientChildCppToC::Get(
self)->GetOtherValue();
int _retval =
CefTranslatorTestRefPtrClientChildCppToC::Get(self)->GetOtherValue();
// Return type: simple
return _retval;
@ -42,9 +43,10 @@ int CEF_CALLBACK translator_test_ref_ptr_client_child_get_value(
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrClientChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_client_child_t*>(
self))->GetValue();
int _retval =
CefTranslatorTestRefPtrClientChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_client_child_t*>(self))
->GetValue();
// Return type: simple
return _retval;
@ -52,31 +54,37 @@ int CEF_CALLBACK translator_test_ref_ptr_client_child_get_value(
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrClientChildCppToC::CefTranslatorTestRefPtrClientChildCppToC(
) {
CefTranslatorTestRefPtrClientChildCppToC::
CefTranslatorTestRefPtrClientChildCppToC() {
GetStruct()->get_other_value =
translator_test_ref_ptr_client_child_get_other_value;
GetStruct()->base.get_value = translator_test_ref_ptr_client_child_get_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrClientChild> CefCppToCRefCounted<CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::UnwrapDerived(
CefWrapperType type, cef_translator_test_ref_ptr_client_child_t* s) {
template <>
CefRefPtr<CefTranslatorTestRefPtrClientChild>
CefCppToCRefCounted<CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::
UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_client_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestRefPtrClientChildCppToC,
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefTranslatorTestRefPtrClientChildCppToC,
template <>
CefWrapperType CefCppToCRefCounted<
CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=26f33d930fc831a3a87a4bb5e176d6f68d543557$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included wrapper-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestRefPtrClientChildCppToC
: public CefCppToCRefCounted<CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t> {
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t> {
public:
CefTranslatorTestRefPtrClientChildCppToC();
};

View File

@ -9,10 +9,11 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b04a2cadf7325090a53b435cf777173216802ec1$
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h"
namespace {
@ -35,17 +36,19 @@ int CEF_CALLBACK translator_test_ref_ptr_client_get_value(
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrClientCppToC::CefTranslatorTestRefPtrClientCppToC() {
GetStruct()->get_value = translator_test_ref_ptr_client_get_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrClient> CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_client_t* s) {
template <>
CefRefPtr<CefTranslatorTestRefPtrClient>
CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::
UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_client_t* s) {
if (type == WT_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD) {
return CefTranslatorTestRefPtrClientChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_ref_ptr_client_child_t*>(s));
@ -55,12 +58,16 @@ template<> CefRefPtr<CefTranslatorTestRefPtrClient> CefCppToCRefCounted<CefTrans
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_CLIENT;
template <>
CefWrapperType
CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_CLIENT;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ba8f806e20f52adb5558d5f84e590e94e32a1dfd$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CPPTOC_H_
@ -18,15 +20,16 @@
#error This file can be included wrapper-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestRefPtrClientCppToC
: public CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient, cef_translator_test_ref_ptr_client_t> {
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t> {
public:
CefTranslatorTestRefPtrClientCppToC();
};

View File

@ -9,33 +9,34 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c56ee9df7fe88c830a7e0280908e1c56d450c974$
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_ref_ptr_library_child_child_t* cef_translator_test_ref_ptr_library_child_child_create(
int value, int other_value, int other_other_value) {
CEF_EXPORT cef_translator_test_ref_ptr_library_child_child_t*
cef_translator_test_ref_ptr_library_child_child_create(int value,
int other_value,
int other_other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild> _retval =
CefTranslatorTestRefPtrLibraryChildChild::Create(
value,
other_value,
other_other_value);
CefTranslatorTestRefPtrLibraryChildChild::Create(value, other_value,
other_other_value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryChildChildCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_other_other_value(
int CEF_CALLBACK
translator_test_ref_ptr_library_child_child_get_other_other_value(
struct _cef_translator_test_ref_ptr_library_child_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -44,14 +45,15 @@ int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_other_other_val
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
self)->GetOtherOtherValue();
int _retval = CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(self)
->GetOtherOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_ref_ptr_library_child_child_set_other_other_value(
void CEF_CALLBACK
translator_test_ref_ptr_library_child_child_set_other_other_value(
struct _cef_translator_test_ref_ptr_library_child_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -74,16 +76,19 @@ int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_other_value(
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))->GetOtherValue();
int _retval =
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))
->GetOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_ref_ptr_library_child_child_set_other_value(
struct _cef_translator_test_ref_ptr_library_child_t* self, int value) {
struct _cef_translator_test_ref_ptr_library_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -93,8 +98,8 @@ void CEF_CALLBACK translator_test_ref_ptr_library_child_child_set_other_value(
// Execute
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))->SetOtherValue(
value);
self))
->SetOtherValue(value);
}
int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_value(
@ -106,16 +111,19 @@ int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_value(
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))->GetValue();
int _retval =
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))
->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_ref_ptr_library_child_child_set_value(
struct _cef_translator_test_ref_ptr_library_t* self, int value) {
struct _cef_translator_test_ref_ptr_library_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -125,17 +133,16 @@ void CEF_CALLBACK translator_test_ref_ptr_library_child_child_set_value(
// Execute
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))->SetValue(
value);
self))
->SetValue(value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryChildChildCppToC::CefTranslatorTestRefPtrLibraryChildChildCppToC(
) {
CefTranslatorTestRefPtrLibraryChildChildCppToC::
CefTranslatorTestRefPtrLibraryChildChildCppToC() {
GetStruct()->get_other_other_value =
translator_test_ref_ptr_library_child_child_get_other_other_value;
GetStruct()->set_other_other_value =
@ -150,22 +157,28 @@ CefTranslatorTestRefPtrLibraryChildChildCppToC::CefTranslatorTestRefPtrLibraryCh
translator_test_ref_ptr_library_child_child_set_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild> CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::UnwrapDerived(
CefWrapperType type,
cef_translator_test_ref_ptr_library_child_child_t* s) {
template <>
CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild>
CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::
UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_library_child_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildChildCppToC,
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildChildCppToC,
template <>
CefWrapperType CefCppToCRefCounted<
CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=9c39bcebe88be5d6292c396812567cd786f85d29$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CPPTOC_H_
@ -18,16 +20,17 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestRefPtrLibraryChildChildCppToC
: public CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t> {
: public CefCppToCRefCounted<
CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t> {
public:
CefTranslatorTestRefPtrLibraryChildChildCppToC();
};

View File

@ -9,28 +9,26 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ddb7af27ed3901230f51b510f706e1c38e9c18b5$
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_ref_ptr_library_child_t* cef_translator_test_ref_ptr_library_child_create(
int value, int other_value) {
CEF_EXPORT cef_translator_test_ref_ptr_library_child_t*
cef_translator_test_ref_ptr_library_child_create(int value, int other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibraryChild> _retval =
CefTranslatorTestRefPtrLibraryChild::Create(
value,
other_value);
CefTranslatorTestRefPtrLibraryChild::Create(value, other_value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryChildCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
@ -44,15 +42,16 @@ int CEF_CALLBACK translator_test_ref_ptr_library_child_get_other_value(
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrLibraryChildCppToC::Get(
self)->GetOtherValue();
int _retval =
CefTranslatorTestRefPtrLibraryChildCppToC::Get(self)->GetOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_ref_ptr_library_child_set_other_value(
struct _cef_translator_test_ref_ptr_library_child_t* self, int value) {
struct _cef_translator_test_ref_ptr_library_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -60,8 +59,7 @@ void CEF_CALLBACK translator_test_ref_ptr_library_child_set_other_value(
return;
// Execute
CefTranslatorTestRefPtrLibraryChildCppToC::Get(self)->SetOtherValue(
value);
CefTranslatorTestRefPtrLibraryChildCppToC::Get(self)->SetOtherValue(value);
}
int CEF_CALLBACK translator_test_ref_ptr_library_child_get_value(
@ -73,16 +71,18 @@ int CEF_CALLBACK translator_test_ref_ptr_library_child_get_value(
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(
self))->GetValue();
int _retval =
CefTranslatorTestRefPtrLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(self))
->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_ref_ptr_library_child_set_value(
struct _cef_translator_test_ref_ptr_library_t* self, int value) {
struct _cef_translator_test_ref_ptr_library_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -91,18 +91,16 @@ void CEF_CALLBACK translator_test_ref_ptr_library_child_set_value(
// Execute
CefTranslatorTestRefPtrLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(
self))->SetValue(
value);
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(self))
->SetValue(value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryChildCppToC::CefTranslatorTestRefPtrLibraryChildCppToC(
) {
CefTranslatorTestRefPtrLibraryChildCppToC::
CefTranslatorTestRefPtrLibraryChildCppToC() {
GetStruct()->get_other_value =
translator_test_ref_ptr_library_child_get_other_value;
GetStruct()->set_other_value =
@ -111,26 +109,33 @@ CefTranslatorTestRefPtrLibraryChildCppToC::CefTranslatorTestRefPtrLibraryChildCp
GetStruct()->base.set_value = translator_test_ref_ptr_library_child_set_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrLibraryChild> CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::UnwrapDerived(
CefWrapperType type, cef_translator_test_ref_ptr_library_child_t* s) {
template <>
CefRefPtr<CefTranslatorTestRefPtrLibraryChild>
CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::
UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_library_child_t* s) {
if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD) {
return CefTranslatorTestRefPtrLibraryChildChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
s));
s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildCppToC,
template <>
base::AtomicRefCount CefCppToCRefCounted<
CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildCppToC,
template <>
CefWrapperType CefCppToCRefCounted<
CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ab2e5c419d32dd5486971cb81421af85d26301d9$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestRefPtrLibraryChildCppToC
: public CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t> {
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t> {
public:
CefTranslatorTestRefPtrLibraryChildCppToC();
};

View File

@ -9,28 +9,27 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=4d312527991e076c9fceef16ba645c103b074d80$
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_ref_ptr_library_t* cef_translator_test_ref_ptr_library_create(
int value) {
CEF_EXPORT cef_translator_test_ref_ptr_library_t*
cef_translator_test_ref_ptr_library_create(int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestRefPtrLibrary::Create(
value);
CefTranslatorTestRefPtrLibrary::Create(value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
@ -51,7 +50,8 @@ int CEF_CALLBACK translator_test_ref_ptr_library_get_value(
}
void CEF_CALLBACK translator_test_ref_ptr_library_set_value(
struct _cef_translator_test_ref_ptr_library_t* self, int value) {
struct _cef_translator_test_ref_ptr_library_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -59,13 +59,11 @@ void CEF_CALLBACK translator_test_ref_ptr_library_set_value(
return;
// Execute
CefTranslatorTestRefPtrLibraryCppToC::Get(self)->SetValue(
value);
CefTranslatorTestRefPtrLibraryCppToC::Get(self)->SetValue(value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryCppToC::CefTranslatorTestRefPtrLibraryCppToC() {
@ -73,10 +71,13 @@ CefTranslatorTestRefPtrLibraryCppToC::CefTranslatorTestRefPtrLibraryCppToC() {
GetStruct()->set_value = translator_test_ref_ptr_library_set_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrLibrary> CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_library_t* s) {
template <>
CefRefPtr<CefTranslatorTestRefPtrLibrary>
CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::
UnwrapDerived(CefWrapperType type,
cef_translator_test_ref_ptr_library_t* s) {
if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD) {
return CefTranslatorTestRefPtrLibraryChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(s));
@ -84,19 +85,23 @@ template<> CefRefPtr<CefTranslatorTestRefPtrLibrary> CefCppToCRefCounted<CefTran
if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD) {
return CefTranslatorTestRefPtrLibraryChildChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
s));
s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY;
template <>
CefWrapperType
CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ae5e7ee72f250a7b8445f6a190c4df782bb9293a$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestRefPtrLibraryCppToC
: public CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t> {
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t> {
public:
CefTranslatorTestRefPtrLibraryCppToC();
};

View File

@ -9,10 +9,11 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=34501f81cbf83f221b8a0ce0a4ccdc68e5aa1450$
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
@ -26,8 +27,8 @@ int CEF_CALLBACK translator_test_scoped_client_child_get_other_value(
return 0;
// Execute
int _retval = CefTranslatorTestScopedClientChildCppToC::Get(
self)->GetOtherValue();
int _retval =
CefTranslatorTestScopedClientChildCppToC::Get(self)->GetOtherValue();
// Return type: simple
return _retval;
@ -42,9 +43,10 @@ int CEF_CALLBACK translator_test_scoped_client_child_get_value(
return 0;
// Execute
int _retval = CefTranslatorTestScopedClientChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(
self))->GetValue();
int _retval =
CefTranslatorTestScopedClientChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(self))
->GetValue();
// Return type: simple
return _retval;
@ -52,39 +54,48 @@ int CEF_CALLBACK translator_test_scoped_client_child_get_value(
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedClientChildCppToC::CefTranslatorTestScopedClientChildCppToC(
) {
CefTranslatorTestScopedClientChildCppToC::
CefTranslatorTestScopedClientChildCppToC() {
GetStruct()->get_other_value =
translator_test_scoped_client_child_get_other_value;
GetStruct()->base.get_value = translator_test_scoped_client_child_get_value;
}
template<> CefOwnPtr<CefTranslatorTestScopedClientChild> CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::UnwrapDerivedOwn(
CefWrapperType type, cef_translator_test_scoped_client_child_t* s) {
template <>
CefOwnPtr<CefTranslatorTestScopedClientChild>
CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::
UnwrapDerivedOwn(CefWrapperType type,
cef_translator_test_scoped_client_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return CefOwnPtr<CefTranslatorTestScopedClientChild>();
}
template<> CefRawPtr<CefTranslatorTestScopedClientChild> CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::UnwrapDerivedRaw(
CefWrapperType type, cef_translator_test_scoped_client_child_t* s) {
template <>
CefRawPtr<CefTranslatorTestScopedClientChild>
CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::
UnwrapDerivedRaw(CefWrapperType type,
cef_translator_test_scoped_client_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD;
template <>
CefWrapperType
CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2cc37369b97dcd34cc0e1a0574526230a5a6ab39$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included wrapper-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_scoped.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestScopedClientChildCppToC
: public CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t> {
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t> {
public:
CefTranslatorTestScopedClientChildCppToC();
};

View File

@ -9,10 +9,11 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=92dd8bbaed61f94cb42dd4eddcd5345b0d619dc7$
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h"
namespace {
@ -35,30 +36,36 @@ int CEF_CALLBACK translator_test_scoped_client_get_value(
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedClientCppToC::CefTranslatorTestScopedClientCppToC() {
GetStruct()->get_value = translator_test_scoped_client_get_value;
}
template<> CefOwnPtr<CefTranslatorTestScopedClient> CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::UnwrapDerivedOwn(CefWrapperType type,
cef_translator_test_scoped_client_t* s) {
template <>
CefOwnPtr<CefTranslatorTestScopedClient>
CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::
UnwrapDerivedOwn(CefWrapperType type,
cef_translator_test_scoped_client_t* s) {
if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
return OWN_RETURN_AS(CefTranslatorTestScopedClientChildCppToC::UnwrapOwn(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(s)),
return OWN_RETURN_AS(
CefTranslatorTestScopedClientChildCppToC::UnwrapOwn(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(s)),
CefTranslatorTestScopedClient);
}
NOTREACHED() << "Unexpected class type: " << type;
return CefOwnPtr<CefTranslatorTestScopedClient>();
}
template<> CefRawPtr<CefTranslatorTestScopedClient> CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::UnwrapDerivedRaw(CefWrapperType type,
cef_translator_test_scoped_client_t* s) {
template <>
CefRawPtr<CefTranslatorTestScopedClient>
CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::
UnwrapDerivedRaw(CefWrapperType type,
cef_translator_test_scoped_client_t* s) {
if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
return CefTranslatorTestScopedClientChildCppToC::UnwrapRaw(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(s));
@ -68,12 +75,16 @@ template<> CefRawPtr<CefTranslatorTestScopedClient> CefCppToCScoped<CefTranslato
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT;
template <>
CefWrapperType
CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2ba29232c78f44ec672d78ced0edde92ee87c6af$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_
@ -18,15 +20,16 @@
#error This file can be included wrapper-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_scoped.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestScopedClientCppToC
: public CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
CefTranslatorTestScopedClient, cef_translator_test_scoped_client_t> {
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t> {
public:
CefTranslatorTestScopedClientCppToC();
};

View File

@ -9,34 +9,35 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=5c83a33a42a843767e80850f18908237db7754ce$
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_scoped_library_child_child_t* cef_translator_test_scoped_library_child_child_create(
int value, int other_value, int other_other_value) {
CEF_EXPORT cef_translator_test_scoped_library_child_child_t*
cef_translator_test_scoped_library_child_child_create(int value,
int other_value,
int other_other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> _retval =
CefTranslatorTestScopedLibraryChildChild::Create(
value,
other_value,
other_other_value);
CefTranslatorTestScopedLibraryChildChild::Create(value, other_value,
other_other_value);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryChildChildCppToC::WrapOwn(OWN_PASS(
_retval));
return CefTranslatorTestScopedLibraryChildChildCppToC::WrapOwn(
OWN_PASS(_retval));
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_scoped_library_child_child_get_other_other_value(
int CEF_CALLBACK
translator_test_scoped_library_child_child_get_other_other_value(
struct _cef_translator_test_scoped_library_child_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -45,14 +46,15 @@ int CEF_CALLBACK translator_test_scoped_library_child_child_get_other_other_valu
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryChildChildCppToC::Get(
self)->GetOtherOtherValue();
int _retval = CefTranslatorTestScopedLibraryChildChildCppToC::Get(self)
->GetOtherOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_scoped_library_child_child_set_other_other_value(
void CEF_CALLBACK
translator_test_scoped_library_child_child_set_other_other_value(
struct _cef_translator_test_scoped_library_child_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -75,16 +77,19 @@ int CEF_CALLBACK translator_test_scoped_library_child_child_get_other_value(
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))->GetOtherValue();
int _retval =
CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))
->GetOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_scoped_library_child_child_set_other_value(
struct _cef_translator_test_scoped_library_child_t* self, int value) {
struct _cef_translator_test_scoped_library_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -93,9 +98,8 @@ void CEF_CALLBACK translator_test_scoped_library_child_child_set_other_value(
// Execute
CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))->SetOtherValue(
value);
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(self))
->SetOtherValue(value);
}
int CEF_CALLBACK translator_test_scoped_library_child_child_get_value(
@ -107,16 +111,19 @@ int CEF_CALLBACK translator_test_scoped_library_child_child_get_value(
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))->GetValue();
int _retval =
CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))
->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_scoped_library_child_child_set_value(
struct _cef_translator_test_scoped_library_t* self, int value) {
struct _cef_translator_test_scoped_library_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -125,18 +132,16 @@ void CEF_CALLBACK translator_test_scoped_library_child_child_set_value(
// Execute
CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))->SetValue(
value);
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(self))
->SetValue(value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryChildChildCppToC::CefTranslatorTestScopedLibraryChildChildCppToC(
) {
CefTranslatorTestScopedLibraryChildChildCppToC::
CefTranslatorTestScopedLibraryChildChildCppToC() {
GetStruct()->get_other_other_value =
translator_test_scoped_library_child_child_get_other_other_value;
GetStruct()->set_other_other_value =
@ -151,29 +156,39 @@ CefTranslatorTestScopedLibraryChildChildCppToC::CefTranslatorTestScopedLibraryCh
translator_test_scoped_library_child_child_set_value;
}
template<> CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::UnwrapDerivedOwn(
CefWrapperType type, cef_translator_test_scoped_library_child_child_t* s) {
template <>
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>
CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::
UnwrapDerivedOwn(CefWrapperType type,
cef_translator_test_scoped_library_child_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>();
}
template<> CefRawPtr<CefTranslatorTestScopedLibraryChildChild> CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::UnwrapDerivedRaw(
CefWrapperType type, cef_translator_test_scoped_library_child_child_t* s) {
template <>
CefRawPtr<CefTranslatorTestScopedLibraryChildChild>
CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::
UnwrapDerivedRaw(CefWrapperType type,
cef_translator_test_scoped_library_child_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
template <>
base::AtomicRefCount CefCppToCScoped<
CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
template <>
CefWrapperType CefCppToCScoped<
CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d7909de22aa6b29cea2cc8accfbb0dec9b21d821$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_scoped.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestScopedLibraryChildChildCppToC
: public CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t> {
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t> {
public:
CefTranslatorTestScopedLibraryChildChildCppToC();
};

View File

@ -9,28 +9,26 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=40623df7ec62d989294f7c575e50bc3cd78285d7$
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_scoped_library_child_t* cef_translator_test_scoped_library_child_create(
int value, int other_value) {
CEF_EXPORT cef_translator_test_scoped_library_child_t*
cef_translator_test_scoped_library_child_create(int value, int other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefOwnPtr<CefTranslatorTestScopedLibraryChild> _retval =
CefTranslatorTestScopedLibraryChild::Create(
value,
other_value);
CefTranslatorTestScopedLibraryChild::Create(value, other_value);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryChildCppToC::WrapOwn(OWN_PASS(_retval));
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
@ -44,15 +42,16 @@ int CEF_CALLBACK translator_test_scoped_library_child_get_other_value(
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryChildCppToC::Get(
self)->GetOtherValue();
int _retval =
CefTranslatorTestScopedLibraryChildCppToC::Get(self)->GetOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_scoped_library_child_set_other_value(
struct _cef_translator_test_scoped_library_child_t* self, int value) {
struct _cef_translator_test_scoped_library_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -60,8 +59,7 @@ void CEF_CALLBACK translator_test_scoped_library_child_set_other_value(
return;
// Execute
CefTranslatorTestScopedLibraryChildCppToC::Get(self)->SetOtherValue(
value);
CefTranslatorTestScopedLibraryChildCppToC::Get(self)->SetOtherValue(value);
}
int CEF_CALLBACK translator_test_scoped_library_child_get_value(
@ -73,16 +71,18 @@ int CEF_CALLBACK translator_test_scoped_library_child_get_value(
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
self))->GetValue();
int _retval =
CefTranslatorTestScopedLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(self))
->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_scoped_library_child_set_value(
struct _cef_translator_test_scoped_library_t* self, int value) {
struct _cef_translator_test_scoped_library_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -91,18 +91,16 @@ void CEF_CALLBACK translator_test_scoped_library_child_set_value(
// Execute
CefTranslatorTestScopedLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
self))->SetValue(
value);
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(self))
->SetValue(value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryChildCppToC::CefTranslatorTestScopedLibraryChildCppToC(
) {
CefTranslatorTestScopedLibraryChildCppToC::
CefTranslatorTestScopedLibraryChildCppToC() {
GetStruct()->get_other_value =
translator_test_scoped_library_child_get_other_value;
GetStruct()->set_other_value =
@ -111,40 +109,50 @@ CefTranslatorTestScopedLibraryChildCppToC::CefTranslatorTestScopedLibraryChildCp
GetStruct()->base.set_value = translator_test_scoped_library_child_set_value;
}
template<> CefOwnPtr<CefTranslatorTestScopedLibraryChild> CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::UnwrapDerivedOwn(
CefWrapperType type, cef_translator_test_scoped_library_child_t* s) {
template <>
CefOwnPtr<CefTranslatorTestScopedLibraryChild>
CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::
UnwrapDerivedOwn(CefWrapperType type,
cef_translator_test_scoped_library_child_t* s) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return OWN_RETURN_AS(
CefTranslatorTestScopedLibraryChildChildCppToC::UnwrapOwn(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(s)),
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
s)),
CefTranslatorTestScopedLibraryChild);
}
NOTREACHED() << "Unexpected class type: " << type;
return CefOwnPtr<CefTranslatorTestScopedLibraryChild>();
}
template<> CefRawPtr<CefTranslatorTestScopedLibraryChild> CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::UnwrapDerivedRaw(
CefWrapperType type, cef_translator_test_scoped_library_child_t* s) {
template <>
CefRawPtr<CefTranslatorTestScopedLibraryChild>
CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::
UnwrapDerivedRaw(CefWrapperType type,
cef_translator_test_scoped_library_child_t* s) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return CefTranslatorTestScopedLibraryChildChildCppToC::UnwrapRaw(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
s));
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD;
template <>
CefWrapperType
CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6d426e05965adc35312b0232862373d07804464d$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_scoped.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestScopedLibraryChildCppToC
: public CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t> {
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t> {
public:
CefTranslatorTestScopedLibraryChildCppToC();
};

View File

@ -9,28 +9,27 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=33161851f6d712f15b49b70bb0fc0f06afda83bc$
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_scoped_library_t* cef_translator_test_scoped_library_create(
int value) {
CEF_EXPORT cef_translator_test_scoped_library_t*
cef_translator_test_scoped_library_create(int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestScopedLibrary::Create(
value);
CefTranslatorTestScopedLibrary::Create(value);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
@ -51,7 +50,8 @@ int CEF_CALLBACK translator_test_scoped_library_get_value(
}
void CEF_CALLBACK translator_test_scoped_library_set_value(
struct _cef_translator_test_scoped_library_t* self, int value) {
struct _cef_translator_test_scoped_library_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -59,13 +59,11 @@ void CEF_CALLBACK translator_test_scoped_library_set_value(
return;
// Execute
CefTranslatorTestScopedLibraryCppToC::Get(self)->SetValue(
value);
CefTranslatorTestScopedLibraryCppToC::Get(self)->SetValue(value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryCppToC::CefTranslatorTestScopedLibraryCppToC() {
@ -73,49 +71,60 @@ CefTranslatorTestScopedLibraryCppToC::CefTranslatorTestScopedLibraryCppToC() {
GetStruct()->set_value = translator_test_scoped_library_set_value;
}
template<> CefOwnPtr<CefTranslatorTestScopedLibrary> CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::UnwrapDerivedOwn(
CefWrapperType type, cef_translator_test_scoped_library_t* s) {
template <>
CefOwnPtr<CefTranslatorTestScopedLibrary>
CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::
UnwrapDerivedOwn(CefWrapperType type,
cef_translator_test_scoped_library_t* s) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD) {
return OWN_RETURN_AS(CefTranslatorTestScopedLibraryChildCppToC::UnwrapOwn(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(s)),
return OWN_RETURN_AS(
CefTranslatorTestScopedLibraryChildCppToC::UnwrapOwn(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(s)),
CefTranslatorTestScopedLibrary);
}
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return OWN_RETURN_AS(
CefTranslatorTestScopedLibraryChildChildCppToC::UnwrapOwn(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(s)),
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
s)),
CefTranslatorTestScopedLibrary);
}
NOTREACHED() << "Unexpected class type: " << type;
return CefOwnPtr<CefTranslatorTestScopedLibrary>();
}
template<> CefRawPtr<CefTranslatorTestScopedLibrary> CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::UnwrapDerivedRaw(
CefWrapperType type, cef_translator_test_scoped_library_t* s) {
template <>
CefRawPtr<CefTranslatorTestScopedLibrary>
CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::
UnwrapDerivedRaw(CefWrapperType type,
cef_translator_test_scoped_library_t* s) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD) {
return CefTranslatorTestScopedLibraryChildCppToC::UnwrapRaw(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(s));
}
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return CefTranslatorTestScopedLibraryChildChildCppToC::UnwrapRaw(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
s));
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount
CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY;
template <>
CefWrapperType
CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY;

View File

@ -9,6 +9,8 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=94a390a96a5901df76395e3e279603a6c27d0e28$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_
@ -18,16 +20,16 @@
#error This file can be included DLL-side only
#endif
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "include/test/cef_translator_test.h"
#include "libcef_dll/cpptoc/cpptoc_scoped.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestScopedLibraryCppToC
: public CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t> {
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t> {
public:
CefTranslatorTestScopedLibraryCppToC();
};