Add support for non-ref-counted interface classes (issue #2090)

This commit is contained in:
Marshall Greenblatt
2017-02-07 16:25:11 -05:00
parent 9dd0ca2661
commit 07ba48b082
98 changed files with 6369 additions and 1825 deletions

View File

@ -49,14 +49,18 @@ void CEF_CALLBACK app_on_register_custom_schemes(struct _cef_app_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: registrar; type: refptr_diff
// Verify param: registrar; type: rawptr_diff
DCHECK(registrar);
if (!registrar)
return;
// Translate param: registrar; type: rawptr_diff
CefOwnPtr<CefSchemeRegistrar> registrarPtr(CefSchemeRegistrarCToCpp::Wrap(
registrar));
// Execute
CefAppCppToC::Get(self)->OnRegisterCustomSchemes(
CefSchemeRegistrarCToCpp::Wrap(registrar));
registrarPtr.get());
}
struct _cef_resource_bundle_handler_t* CEF_CALLBACK app_get_resource_bundle_handler(

View File

@ -0,0 +1,30 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "libcef_dll/cpptoc/base_scoped_cpptoc.h"
CefBaseScopedCppToC::CefBaseScopedCppToC() {
}
template<> CefOwnPtr<CefBaseScoped>
CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped, cef_base_scoped_t>::
UnwrapDerivedOwn(CefWrapperType type, cef_base_scoped_t* s) {
NOTREACHED();
return CefOwnPtr<CefBaseScoped>();
}
template<> CefRawPtr<CefBaseScoped>
CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped, cef_base_scoped_t>::
UnwrapDerivedRaw(CefWrapperType type, cef_base_scoped_t* s) {
NOTREACHED();
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefBaseScopedCppToC,
CefBaseScoped, cef_base_scoped_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped,
cef_base_scoped_t>::kWrapperType = WT_BASE;

View File

@ -0,0 +1,25 @@
// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_
#pragma once
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/cpptoc/cpptoc_scoped.h"
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
// Wrap a C++ class with a C structure.
class CefBaseScopedCppToC
: public CefCppToCScoped<CefBaseScopedCppToC, CefBaseScoped,
cef_base_scoped_t> {
public:
CefBaseScopedCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_BASE_CPPTOC_H_

View File

@ -0,0 +1,241 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CPPTOC_CPPTOC_SCOPED_H_
#define CEF_LIBCEF_DLL_CPPTOC_CPPTOC_SCOPED_H_
#pragma once
#include "include/base/cef_logging.h"
#include "include/base/cef_macros.h"
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/ptr_util.h"
#include "libcef_dll/wrapper_types.h"
// Wrap a C++ class with a C structure. This is used when the class
// implementation exists on this side of the DLL boundary but will have methods
// called from the other side of the DLL boundary.
template <class ClassName, class BaseName, class StructName>
class CefCppToCScoped : public CefBaseScoped {
public:
// Create a new wrapper instance and associated structure reference for
// passing an object instance the other side. The wrapper object will be
// deleted when |del| is called on the associated structure. The wrapped
// object will be deleted when the wrapper object is deleted. For example:
//
// void MyMethod(CefOwnPtr<MyType> obj) {
// my_method(MyTypeCppToC::WrapOwn(obj));
// }
//
// void my_method(my_type_t* struct) {
// // Delete the MyTypeCppToC wrapper and the owned MyType object.
// struct->del(struct);
// }
static StructName* WrapOwn(CefOwnPtr<BaseName> c) {
if (!c)
return NULL;
// Wrap our object with the CefCppToC class.
ClassName* wrapper = new ClassName();
wrapper->Initialize(c.release(), true);
// Return the structure pointer that can now be passed to the other side.
return wrapper->GetStruct();
}
// Create a new wrapper instance and associated structure reference for
// passing an object instance to the other side. The wrapper object is owned
// by the caller. The wrapped object is unowned and must outlive the wrapper.
// For example:
//
// void MyMethod(MyType* obj) {
// CefOwnPtr<MyTypeCppToC> MyTypeWrapper = MyTypeCppToC::WrapRaw(obj);
// my_method(MyTypeWrapper->GetStruct());
// // MyTypeWrapper is deleted when MyMethod() goes out of scope.
// }
//
// void my_method(my_type_t* struct) {
// // Access |struct| here but you can't delete it.
// }
static CefOwnPtr<ClassName> WrapRaw(CefRawPtr<BaseName> c) {
if (!c)
return CefOwnPtr<ClassName>();
// Wrap our object with the CefCppToC class.
ClassName* wrapper = new ClassName();
wrapper->Initialize(c, false);
// Return the owned wrapper object.
return CefOwnPtr<ClassName>(wrapper);
}
// Retrieve the underlying object instance for a structure reference passed
// back from the other side. The caller takes ownership of the object. For
// example:
//
// void my_method(my_type_t* struct) {
// CefOwnPtr<MyType> MyTypePtr = MyTypeCppToC::UnwrapOwn(struct);
// // |struct| has been deleted and should no longer be accessed.
// }
static CefOwnPtr<BaseName> UnwrapOwn(StructName* s) {
if (!s)
return CefOwnPtr<BaseName>();
// Cast our structure to the wrapper structure type.
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
// If the type does not match this object then we need to unwrap as the
// derived type.
if (wrapperStruct->type_ != kWrapperType)
return UnwrapDerivedOwn(wrapperStruct->type_, s);
// We should own the underlying object currently.
DCHECK(wrapperStruct->wrapper_->owned_);
DCHECK(wrapperStruct->object_);
// We're giving up ownership of the underlying object. Clear the pointer so
// it doesn't get deleted.
BaseName* object = wrapperStruct->object_;
wrapperStruct->object_ = NULL;
delete wrapperStruct->wrapper_;
// Return the underlying object instance.
return CefOwnPtr<BaseName>(object);
}
// Retrieve the underlying object instance for a structure reference passed
// back from the other side. Ownership does not change. For example:
//
// void my_method(my_type_t* struct) {
// CefRawPtr<MyType> MyTypePtr = MyTypeCppToC::UnwrapRaw(struct);
// // |struct| is still valid.
// }
static CefRawPtr<BaseName> UnwrapRaw(StructName* s) {
if (!s)
return NULL;
// Cast our structure to the wrapper structure type.
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
// If the type does not match this object then we need to unwrap as the
// derived type.
if (wrapperStruct->type_ != kWrapperType)
return UnwrapDerivedRaw(wrapperStruct->type_, s);
// Return the underlying object instance.
return wrapperStruct->object_;
}
// Retrieve the same side wrapper associated with the structure. Ownership
// does not change.
static ClassName* GetWrapper(StructName* s) {
DCHECK(s);
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
return static_cast<ClassName*>(wrapperStruct->wrapper_);
}
// Retrieve the underlying object instance from our own structure reference
// when the reference is passed as the required first parameter of a C API
// function call. Ownership of the object does not change.
static BaseName* Get(StructName* s) {
DCHECK(s);
WrapperStruct* wrapperStruct = GetWrapperStruct(s);
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
return wrapperStruct->object_;
}
// If returning the structure across the DLL boundary you should call
// AddRef() on this CefCppToC object. On the other side of the DLL boundary,
// call UnderlyingRelease() on the wrapping CefCToCpp object.
StructName* GetStruct() { return &wrapper_struct_.struct_; }
#if DCHECK_IS_ON()
// Simple tracking of allocated objects.
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
#endif
protected:
CefCppToCScoped() {
wrapper_struct_.type_ = kWrapperType;
wrapper_struct_.wrapper_ = this;
memset(GetStruct(), 0, sizeof(StructName));
#if DCHECK_IS_ON()
base::AtomicRefCountInc(&DebugObjCt);
#endif
}
virtual ~CefCppToCScoped() {
// Only delete the underlying object if we own it.
if (owned_ && wrapper_struct_.object_)
delete wrapper_struct_.object_;
#if DCHECK_IS_ON()
base::AtomicRefCountDec(&DebugObjCt);
#endif
}
private:
// Used to associate this wrapper object, the underlying object instance and
// the structure that will be passed to the other side.
struct WrapperStruct {
CefWrapperType type_;
BaseName* object_;
CefCppToCScoped<ClassName, BaseName, StructName>* wrapper_;
StructName struct_;
};
void Initialize(BaseName* obj, bool owned) {
wrapper_struct_.object_ = obj;
owned_ = owned;
cef_base_scoped_t* base = reinterpret_cast<cef_base_scoped_t*>(GetStruct());
base->size = sizeof(StructName);
if (owned)
base->del = struct_del;
}
static WrapperStruct* GetWrapperStruct(StructName* s) {
// Offset using the WrapperStruct size instead of individual member sizes
// to avoid problems due to platform/compiler differences in structure
// padding.
return reinterpret_cast<WrapperStruct*>(
reinterpret_cast<char*>(s) -
(sizeof(WrapperStruct) - sizeof(StructName)));
}
// Unwrap as the derived type.
static CefOwnPtr<BaseName> UnwrapDerivedOwn(CefWrapperType type,
StructName* s);
static CefRawPtr<BaseName> UnwrapDerivedRaw(CefWrapperType type,
StructName* s);
static void CEF_CALLBACK struct_del(cef_base_scoped_t* base) {
DCHECK(base);
if (!base)
return;
WrapperStruct* wrapperStruct =
GetWrapperStruct(reinterpret_cast<StructName*>(base));
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
// Should only be deleting wrappers that own the underlying object.
DCHECK(wrapperStruct->wrapper_->owned_);
delete wrapperStruct->wrapper_;
}
WrapperStruct wrapper_struct_;
bool owned_;
static CefWrapperType kWrapperType;
DISALLOW_COPY_AND_ASSIGN(CefCppToCScoped);
};
#endif // CEF_LIBCEF_DLL_CPPTOC_CPPTOC_SCOPED_H_

View File

@ -53,18 +53,25 @@ CefSchemeRegistrarCppToC::CefSchemeRegistrarCppToC() {
GetStruct()->add_custom_scheme = scheme_registrar_add_custom_scheme;
}
template<> CefRefPtr<CefSchemeRegistrar> CefCppToC<CefSchemeRegistrarCppToC,
CefSchemeRegistrar, cef_scheme_registrar_t>::UnwrapDerived(
template<> CefOwnPtr<CefSchemeRegistrar> CefCppToCScoped<CefSchemeRegistrarCppToC,
CefSchemeRegistrar, cef_scheme_registrar_t>::UnwrapDerivedOwn(
CefWrapperType type, cef_scheme_registrar_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return CefOwnPtr<CefSchemeRegistrar>();
}
template<> CefRawPtr<CefSchemeRegistrar> CefCppToCScoped<CefSchemeRegistrarCppToC,
CefSchemeRegistrar, cef_scheme_registrar_t>::UnwrapDerivedRaw(
CefWrapperType type, cef_scheme_registrar_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefSchemeRegistrarCppToC,
template<> base::AtomicRefCount CefCppToCScoped<CefSchemeRegistrarCppToC,
CefSchemeRegistrar, cef_scheme_registrar_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefSchemeRegistrarCppToC,
template<> CefWrapperType CefCppToCScoped<CefSchemeRegistrarCppToC,
CefSchemeRegistrar, cef_scheme_registrar_t>::kWrapperType =
WT_SCHEME_REGISTRAR;

View File

@ -20,12 +20,12 @@
#include "include/cef_scheme.h"
#include "include/capi/cef_scheme_capi.h"
#include "libcef_dll/cpptoc/cpptoc.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 CefSchemeRegistrarCppToC
: public CefCppToC<CefSchemeRegistrarCppToC, CefSchemeRegistrar,
: public CefCppToCScoped<CefSchemeRegistrarCppToC, CefSchemeRegistrar,
cef_scheme_registrar_t> {
public:
CefSchemeRegistrarCppToC();

View File

@ -12,10 +12,14 @@
#include <algorithm>
#include "libcef_dll/cpptoc/test/translator_test_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_object_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_object_child_cpptoc.h"
#include "libcef_dll/ctocpp/test/translator_test_handler_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_handler_child_ctocpp.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_scoped_library_child_cpptoc.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.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_scoped_client_child_ctocpp.h"
#include "libcef_dll/transfer_util.h"
@ -653,7 +657,7 @@ size_t CEF_CALLBACK translator_test_get_point_list_size(
return _retval;
}
struct _cef_translator_test_object_t* CEF_CALLBACK translator_test_get_object(
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
@ -662,16 +666,17 @@ struct _cef_translator_test_object_t* CEF_CALLBACK translator_test_get_object(
return NULL;
// Execute
CefRefPtr<CefTranslatorTestObject> _retval = CefTranslatorTestCppToC::Get(
self)->GetObject(
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->GetRefPtrLibrary(
val);
// Return type: refptr_same
return CefTranslatorTestObjectCppToC::Wrap(_retval);
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
}
int CEF_CALLBACK translator_test_set_object(struct _cef_translator_test_t* self,
struct _cef_translator_test_object_t* val) {
int CEF_CALLBACK translator_test_set_ref_ptr_library(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -683,16 +688,16 @@ int CEF_CALLBACK translator_test_set_object(struct _cef_translator_test_t* self,
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetObject(
CefTranslatorTestObjectCppToC::Unwrap(val));
int _retval = CefTranslatorTestCppToC::Get(self)->SetRefPtrLibrary(
CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val));
// Return type: simple
return _retval;
}
struct _cef_translator_test_object_t* CEF_CALLBACK translator_test_set_object_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_object_t* val) {
struct _cef_translator_test_ref_ptr_library_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -704,17 +709,17 @@ struct _cef_translator_test_object_t* CEF_CALLBACK translator_test_set_object_an
return NULL;
// Execute
CefRefPtr<CefTranslatorTestObject> _retval = CefTranslatorTestCppToC::Get(
self)->SetObjectAndReturn(
CefTranslatorTestObjectCppToC::Unwrap(val));
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetRefPtrLibraryAndReturn(
CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val));
// Return type: refptr_same
return CefTranslatorTestObjectCppToC::Wrap(_retval);
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
}
int CEF_CALLBACK translator_test_set_child_object(
int CEF_CALLBACK translator_test_set_child_ref_ptr_library(
struct _cef_translator_test_t* self,
struct _cef_translator_test_object_child_t* val) {
struct _cef_translator_test_ref_ptr_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -726,16 +731,16 @@ int CEF_CALLBACK translator_test_set_child_object(
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildObject(
CefTranslatorTestObjectChildCppToC::Unwrap(val));
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildRefPtrLibrary(
CefTranslatorTestRefPtrLibraryChildCppToC::Unwrap(val));
// Return type: simple
return _retval;
}
struct _cef_translator_test_object_t* CEF_CALLBACK translator_test_set_child_object_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_object_child_t* val) {
struct _cef_translator_test_ref_ptr_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -747,17 +752,18 @@ struct _cef_translator_test_object_t* CEF_CALLBACK translator_test_set_child_obj
return NULL;
// Execute
CefRefPtr<CefTranslatorTestObject> _retval = CefTranslatorTestCppToC::Get(
self)->SetChildObjectAndReturnParent(
CefTranslatorTestObjectChildCppToC::Unwrap(val));
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildRefPtrLibraryAndReturnParent(
CefTranslatorTestRefPtrLibraryChildCppToC::Unwrap(val));
// Return type: refptr_same
return CefTranslatorTestObjectCppToC::Wrap(_retval);
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
}
int CEF_CALLBACK translator_test_set_object_list(
int CEF_CALLBACK translator_test_set_ref_ptr_library_list(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_object_t* const* val, int val1, int val2) {
struct _cef_translator_test_ref_ptr_library_t* const* val, int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -769,17 +775,17 @@ int CEF_CALLBACK translator_test_set_object_list(
return 0;
// Translate param: val; type: refptr_vec_same_byref_const
std::vector<CefRefPtr<CefTranslatorTestObject> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary> > valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRefPtr<CefTranslatorTestObject> valVal =
CefTranslatorTestObjectCppToC::Unwrap(val[i]);
CefRefPtr<CefTranslatorTestRefPtrLibrary> valVal =
CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val[i]);
valList.push_back(valVal);
}
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetObjectList(
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRefPtrLibraryList(
valList,
val1,
val2);
@ -788,9 +794,9 @@ int CEF_CALLBACK translator_test_set_object_list(
return _retval;
}
int CEF_CALLBACK translator_test_get_object_list_by_ref(
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_object_t** val, int val1, int val2) {
struct _cef_translator_test_ref_ptr_library_t** val, int val1, int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -802,15 +808,15 @@ int CEF_CALLBACK translator_test_get_object_list_by_ref(
return 0;
// Translate param: val; type: refptr_vec_same_byref
std::vector<CefRefPtr<CefTranslatorTestObject> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary> > valList;
if (valCount && *valCount > 0 && val) {
for (size_t i = 0; i < *valCount; ++i) {
valList.push_back(CefTranslatorTestObjectCppToC::Unwrap(val[i]));
valList.push_back(CefTranslatorTestRefPtrLibraryCppToC::Unwrap(val[i]));
}
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetObjectListByRef(
bool _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrLibraryListByRef(
valList,
val1,
val2);
@ -820,7 +826,7 @@ int CEF_CALLBACK translator_test_get_object_list_by_ref(
*valCount = std::min(valList.size(), *valCount);
if (*valCount > 0) {
for (size_t i = 0; i < *valCount; ++i) {
val[i] = CefTranslatorTestObjectCppToC::Wrap(valList[i]);
val[i] = CefTranslatorTestRefPtrLibraryCppToC::Wrap(valList[i]);
}
}
}
@ -829,7 +835,7 @@ int CEF_CALLBACK translator_test_get_object_list_by_ref(
return _retval;
}
size_t CEF_CALLBACK translator_test_get_object_list_size(
size_t CEF_CALLBACK translator_test_get_ref_ptr_library_list_size(
struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -838,15 +844,16 @@ size_t CEF_CALLBACK translator_test_get_object_list_size(
return 0;
// Execute
size_t _retval = CefTranslatorTestCppToC::Get(self)->GetObjectListSize();
size_t _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrLibraryListSize(
);
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_set_handler(
int CEF_CALLBACK translator_test_set_ref_ptr_client(
struct _cef_translator_test_t* self,
struct _cef_translator_test_handler_t* val) {
struct _cef_translator_test_ref_ptr_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -858,16 +865,16 @@ int CEF_CALLBACK translator_test_set_handler(
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetHandler(
CefTranslatorTestHandlerCToCpp::Wrap(val));
int _retval = CefTranslatorTestCppToC::Get(self)->SetRefPtrClient(
CefTranslatorTestRefPtrClientCToCpp::Wrap(val));
// Return type: simple
return _retval;
}
struct _cef_translator_test_handler_t* CEF_CALLBACK translator_test_set_handler_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_handler_t* val) {
struct _cef_translator_test_ref_ptr_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -879,17 +886,17 @@ struct _cef_translator_test_handler_t* CEF_CALLBACK translator_test_set_handler_
return NULL;
// Execute
CefRefPtr<CefTranslatorTestHandler> _retval = CefTranslatorTestCppToC::Get(
self)->SetHandlerAndReturn(
CefTranslatorTestHandlerCToCpp::Wrap(val));
CefRefPtr<CefTranslatorTestRefPtrClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetRefPtrClientAndReturn(
CefTranslatorTestRefPtrClientCToCpp::Wrap(val));
// Return type: refptr_diff
return CefTranslatorTestHandlerCToCpp::Unwrap(_retval);
return CefTranslatorTestRefPtrClientCToCpp::Unwrap(_retval);
}
int CEF_CALLBACK translator_test_set_child_handler(
int CEF_CALLBACK translator_test_set_child_ref_ptr_client(
struct _cef_translator_test_t* self,
struct _cef_translator_test_handler_child_t* val) {
struct _cef_translator_test_ref_ptr_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -901,16 +908,16 @@ int CEF_CALLBACK translator_test_set_child_handler(
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildHandler(
CefTranslatorTestHandlerChildCToCpp::Wrap(val));
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildRefPtrClient(
CefTranslatorTestRefPtrClientChildCToCpp::Wrap(val));
// Return type: simple
return _retval;
}
struct _cef_translator_test_handler_t* CEF_CALLBACK translator_test_set_child_handler_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_handler_child_t* val) {
struct _cef_translator_test_ref_ptr_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -922,17 +929,18 @@ struct _cef_translator_test_handler_t* CEF_CALLBACK translator_test_set_child_ha
return NULL;
// Execute
CefRefPtr<CefTranslatorTestHandler> _retval = CefTranslatorTestCppToC::Get(
self)->SetChildHandlerAndReturnParent(
CefTranslatorTestHandlerChildCToCpp::Wrap(val));
CefRefPtr<CefTranslatorTestRefPtrClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildRefPtrClientAndReturnParent(
CefTranslatorTestRefPtrClientChildCToCpp::Wrap(val));
// Return type: refptr_diff
return CefTranslatorTestHandlerCToCpp::Unwrap(_retval);
return CefTranslatorTestRefPtrClientCToCpp::Unwrap(_retval);
}
int CEF_CALLBACK translator_test_set_handler_list(
int CEF_CALLBACK translator_test_set_ref_ptr_client_list(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_handler_t* const* val, int val1, int val2) {
struct _cef_translator_test_ref_ptr_client_t* const* val, int val1,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -944,17 +952,17 @@ int CEF_CALLBACK translator_test_set_handler_list(
return 0;
// Translate param: val; type: refptr_vec_diff_byref_const
std::vector<CefRefPtr<CefTranslatorTestHandler> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrClient> > valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRefPtr<CefTranslatorTestHandler> valVal =
CefTranslatorTestHandlerCToCpp::Wrap(val[i]);
CefRefPtr<CefTranslatorTestRefPtrClient> valVal =
CefTranslatorTestRefPtrClientCToCpp::Wrap(val[i]);
valList.push_back(valVal);
}
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetHandlerList(
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRefPtrClientList(
valList,
val1,
val2);
@ -963,11 +971,11 @@ int CEF_CALLBACK translator_test_set_handler_list(
return _retval;
}
int CEF_CALLBACK translator_test_get_handler_list_by_ref(
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_handler_t** val,
struct _cef_translator_test_handler_t* val1,
struct _cef_translator_test_handler_t* val2) {
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -987,25 +995,25 @@ int CEF_CALLBACK translator_test_get_handler_list_by_ref(
return 0;
// Translate param: val; type: refptr_vec_diff_byref
std::vector<CefRefPtr<CefTranslatorTestHandler> > valList;
std::vector<CefRefPtr<CefTranslatorTestRefPtrClient> > valList;
if (valCount && *valCount > 0 && val) {
for (size_t i = 0; i < *valCount; ++i) {
valList.push_back(CefTranslatorTestHandlerCToCpp::Wrap(val[i]));
valList.push_back(CefTranslatorTestRefPtrClientCToCpp::Wrap(val[i]));
}
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->GetHandlerListByRef(
bool _retval = CefTranslatorTestCppToC::Get(self)->GetRefPtrClientListByRef(
valList,
CefTranslatorTestHandlerCToCpp::Wrap(val1),
CefTranslatorTestHandlerCToCpp::Wrap(val2));
CefTranslatorTestRefPtrClientCToCpp::Wrap(val1),
CefTranslatorTestRefPtrClientCToCpp::Wrap(val2));
// Restore param: val; type: refptr_vec_diff_byref
if (valCount && val) {
*valCount = std::min(valList.size(), *valCount);
if (*valCount > 0) {
for (size_t i = 0; i < *valCount; ++i) {
val[i] = CefTranslatorTestHandlerCToCpp::Unwrap(valList[i]);
val[i] = CefTranslatorTestRefPtrClientCToCpp::Unwrap(valList[i]);
}
}
}
@ -1014,7 +1022,7 @@ int CEF_CALLBACK translator_test_get_handler_list_by_ref(
return _retval;
}
size_t CEF_CALLBACK translator_test_get_handler_list_size(
size_t CEF_CALLBACK translator_test_get_ref_ptr_client_list_size(
struct _cef_translator_test_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1023,12 +1031,385 @@ size_t CEF_CALLBACK translator_test_get_handler_list_size(
return 0;
// Execute
size_t _retval = CefTranslatorTestCppToC::Get(self)->GetHandlerListSize();
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->GetOwnPtrLibrary(
val);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
}
int CEF_CALLBACK translator_test_set_own_ptr_library(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: ownptr_same
DCHECK(val);
if (!val)
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetOwnPtrLibrary(
CefTranslatorTestScopedLibraryCppToC::UnwrapOwn(val));
// Return type: simple
return _retval;
}
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
DCHECK(self);
if (!self)
return NULL;
// Verify param: val; type: ownptr_same
DCHECK(val);
if (!val)
return NULL;
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetOwnPtrLibraryAndReturn(
CefTranslatorTestScopedLibraryCppToC::UnwrapOwn(val));
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
}
int CEF_CALLBACK translator_test_set_child_own_ptr_library(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: ownptr_same
DCHECK(val);
if (!val)
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildOwnPtrLibrary(
CefTranslatorTestScopedLibraryChildCppToC::UnwrapOwn(val));
// Return type: simple
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_t* self,
struct _cef_translator_test_scoped_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: val; type: ownptr_same
DCHECK(val);
if (!val)
return NULL;
// Execute
CefOwnPtr<CefTranslatorTestScopedLibrary> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildOwnPtrLibraryAndReturnParent(
CefTranslatorTestScopedLibraryChildCppToC::UnwrapOwn(val));
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
}
int CEF_CALLBACK translator_test_set_own_ptr_client(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: ownptr_diff
DCHECK(val);
if (!val)
return 0;
// Translate param: val; type: ownptr_diff
CefOwnPtr<CefTranslatorTestScopedClient> valPtr(
CefTranslatorTestScopedClientCToCpp::Wrap(val));
// Execute
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_t* self,
struct _cef_translator_test_scoped_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: val; type: ownptr_diff
DCHECK(val);
if (!val)
return NULL;
// Translate param: val; type: ownptr_diff
CefOwnPtr<CefTranslatorTestScopedClient> valPtr(
CefTranslatorTestScopedClientCToCpp::Wrap(val));
// Execute
CefOwnPtr<CefTranslatorTestScopedClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetOwnPtrClientAndReturn(
OWN_PASS(valPtr));
// Return type: ownptr_diff
return CefTranslatorTestScopedClientCToCpp::UnwrapOwn(OWN_PASS(_retval));
}
int CEF_CALLBACK translator_test_set_child_own_ptr_client(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: ownptr_diff
DCHECK(val);
if (!val)
return 0;
// Translate param: val; type: ownptr_diff
CefOwnPtr<CefTranslatorTestScopedClientChild> valPtr(
CefTranslatorTestScopedClientChildCToCpp::Wrap(val));
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildOwnPtrClient(
OWN_PASS(valPtr));
// Return type: simple
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_t* self,
struct _cef_translator_test_scoped_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: val; type: ownptr_diff
DCHECK(val);
if (!val)
return NULL;
// Translate param: val; type: ownptr_diff
CefOwnPtr<CefTranslatorTestScopedClientChild> valPtr(
CefTranslatorTestScopedClientChildCToCpp::Wrap(val));
// Execute
CefOwnPtr<CefTranslatorTestScopedClient> _retval =
CefTranslatorTestCppToC::Get(self)->SetChildOwnPtrClientAndReturnParent(
OWN_PASS(valPtr));
// Return type: ownptr_diff
return CefTranslatorTestScopedClientCToCpp::UnwrapOwn(OWN_PASS(_retval));
}
int CEF_CALLBACK translator_test_set_raw_ptr_library(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: rawptr_same
DCHECK(val);
if (!val)
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrLibrary(
CefTranslatorTestScopedLibraryCppToC::UnwrapRaw(val));
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_set_child_raw_ptr_library(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: rawptr_same
DCHECK(val);
if (!val)
return 0;
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetChildRawPtrLibrary(
CefTranslatorTestScopedLibraryChildCppToC::UnwrapRaw(val));
// Return type: simple
return _retval;
}
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,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: rawptr_vec_same_byref_const
DCHECK(valCount == 0 || val);
if (valCount > 0 && !val)
return 0;
// Translate param: val; type: rawptr_vec_same_byref_const
std::vector<CefRawPtr<CefTranslatorTestScopedLibrary> > valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRawPtr<CefTranslatorTestScopedLibrary> valVal =
CefTranslatorTestScopedLibraryCppToC::UnwrapRaw(val[i]);
valList.push_back(valVal);
}
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrLibraryList(
valList,
val1,
val2);
// Return type: bool
return _retval;
}
int CEF_CALLBACK translator_test_set_raw_ptr_client(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: rawptr_diff
DCHECK(val);
if (!val)
return 0;
// Translate param: val; type: rawptr_diff
CefOwnPtr<CefTranslatorTestScopedClient> valPtr(
CefTranslatorTestScopedClientCToCpp::Wrap(val));
// Execute
int _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrClient(
valPtr.get());
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_set_child_raw_ptr_client(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_child_t* val) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: rawptr_diff
DCHECK(val);
if (!val)
return 0;
// Translate param: val; type: rawptr_diff
CefOwnPtr<CefTranslatorTestScopedClientChild> valPtr(
CefTranslatorTestScopedClientChildCToCpp::Wrap(val));
// Execute
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,
int val2) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: val; type: rawptr_vec_diff_byref_const
DCHECK(valCount == 0 || val);
if (valCount > 0 && !val)
return 0;
// Translate param: val; type: rawptr_vec_diff_byref_const
std::vector<CefRawPtr<CefTranslatorTestScopedClient> > valList;
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
CefRawPtr<CefTranslatorTestScopedClient> valVal =
CefTranslatorTestScopedClientCToCpp::Wrap(val[i]).release();
valList.push_back(valVal);
}
}
// Execute
bool _retval = CefTranslatorTestCppToC::Get(self)->SetRawPtrClientList(
valList,
val1,
val2);
// Restore param: val; type: rawptr_vec_diff_byref_const
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
delete valList[i];
}
}
// Return type: bool
return _retval;
}
} // namespace
@ -1066,24 +1447,58 @@ CefTranslatorTestCppToC::CefTranslatorTestCppToC() {
GetStruct()->set_point_list = translator_test_set_point_list;
GetStruct()->get_point_list_by_ref = translator_test_get_point_list_by_ref;
GetStruct()->get_point_list_size = translator_test_get_point_list_size;
GetStruct()->get_object = translator_test_get_object;
GetStruct()->set_object = translator_test_set_object;
GetStruct()->set_object_and_return = translator_test_set_object_and_return;
GetStruct()->set_child_object = translator_test_set_child_object;
GetStruct()->set_child_object_and_return_parent =
translator_test_set_child_object_and_return_parent;
GetStruct()->set_object_list = translator_test_set_object_list;
GetStruct()->get_object_list_by_ref = translator_test_get_object_list_by_ref;
GetStruct()->get_object_list_size = translator_test_get_object_list_size;
GetStruct()->set_handler = translator_test_set_handler;
GetStruct()->set_handler_and_return = translator_test_set_handler_and_return;
GetStruct()->set_child_handler = translator_test_set_child_handler;
GetStruct()->set_child_handler_and_return_parent =
translator_test_set_child_handler_and_return_parent;
GetStruct()->set_handler_list = translator_test_set_handler_list;
GetStruct()->get_handler_list_by_ref =
translator_test_get_handler_list_by_ref;
GetStruct()->get_handler_list_size = translator_test_get_handler_list_size;
GetStruct()->get_ref_ptr_library = translator_test_get_ref_ptr_library;
GetStruct()->set_ref_ptr_library = translator_test_set_ref_ptr_library;
GetStruct()->set_ref_ptr_library_and_return =
translator_test_set_ref_ptr_library_and_return;
GetStruct()->set_child_ref_ptr_library =
translator_test_set_child_ref_ptr_library;
GetStruct()->set_child_ref_ptr_library_and_return_parent =
translator_test_set_child_ref_ptr_library_and_return_parent;
GetStruct()->set_ref_ptr_library_list =
translator_test_set_ref_ptr_library_list;
GetStruct()->get_ref_ptr_library_list_by_ref =
translator_test_get_ref_ptr_library_list_by_ref;
GetStruct()->get_ref_ptr_library_list_size =
translator_test_get_ref_ptr_library_list_size;
GetStruct()->set_ref_ptr_client = translator_test_set_ref_ptr_client;
GetStruct()->set_ref_ptr_client_and_return =
translator_test_set_ref_ptr_client_and_return;
GetStruct()->set_child_ref_ptr_client =
translator_test_set_child_ref_ptr_client;
GetStruct()->set_child_ref_ptr_client_and_return_parent =
translator_test_set_child_ref_ptr_client_and_return_parent;
GetStruct()->set_ref_ptr_client_list =
translator_test_set_ref_ptr_client_list;
GetStruct()->get_ref_ptr_client_list_by_ref =
translator_test_get_ref_ptr_client_list_by_ref;
GetStruct()->get_ref_ptr_client_list_size =
translator_test_get_ref_ptr_client_list_size;
GetStruct()->get_own_ptr_library = translator_test_get_own_ptr_library;
GetStruct()->set_own_ptr_library = translator_test_set_own_ptr_library;
GetStruct()->set_own_ptr_library_and_return =
translator_test_set_own_ptr_library_and_return;
GetStruct()->set_child_own_ptr_library =
translator_test_set_child_own_ptr_library;
GetStruct()->set_child_own_ptr_library_and_return_parent =
translator_test_set_child_own_ptr_library_and_return_parent;
GetStruct()->set_own_ptr_client = translator_test_set_own_ptr_client;
GetStruct()->set_own_ptr_client_and_return =
translator_test_set_own_ptr_client_and_return;
GetStruct()->set_child_own_ptr_client =
translator_test_set_child_own_ptr_client;
GetStruct()->set_child_own_ptr_client_and_return_parent =
translator_test_set_child_own_ptr_client_and_return_parent;
GetStruct()->set_raw_ptr_library = translator_test_set_raw_ptr_library;
GetStruct()->set_child_raw_ptr_library =
translator_test_set_child_raw_ptr_library;
GetStruct()->set_raw_ptr_library_list =
translator_test_set_raw_ptr_library_list;
GetStruct()->set_raw_ptr_client = translator_test_set_raw_ptr_client;
GetStruct()->set_child_raw_ptr_client =
translator_test_set_child_raw_ptr_client;
GetStruct()->set_raw_ptr_client_list =
translator_test_set_raw_ptr_client_list;
}
template<> CefRefPtr<CefTranslatorTest> CefCppToC<CefTranslatorTestCppToC,

View File

@ -1,79 +0,0 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_handler_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_handler_child_get_other_value(
struct _cef_translator_test_handler_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestHandlerChildCppToC::Get(self)->GetOtherValue();
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_handler_child_get_value(
struct _cef_translator_test_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestHandlerChildCppToC::Get(
reinterpret_cast<cef_translator_test_handler_child_t*>(self))->GetValue(
);
// Return type: simple
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestHandlerChildCppToC::CefTranslatorTestHandlerChildCppToC() {
GetStruct()->get_other_value = translator_test_handler_child_get_other_value;
GetStruct()->base.get_value = translator_test_handler_child_get_value;
}
template<> CefRefPtr<CefTranslatorTestHandlerChild> CefCppToC<CefTranslatorTestHandlerChildCppToC,
CefTranslatorTestHandlerChild,
cef_translator_test_handler_child_t>::UnwrapDerived(CefWrapperType type,
cef_translator_test_handler_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestHandlerChildCppToC,
CefTranslatorTestHandlerChild,
cef_translator_test_handler_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestHandlerChildCppToC,
CefTranslatorTestHandlerChild,
cef_translator_test_handler_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_HANDLER_CHILD;

View File

@ -1,63 +0,0 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_handler_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_handler_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_handler_get_value(
struct _cef_translator_test_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestHandlerCppToC::Get(self)->GetValue();
// Return type: simple
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestHandlerCppToC::CefTranslatorTestHandlerCppToC() {
GetStruct()->get_value = translator_test_handler_get_value;
}
template<> CefRefPtr<CefTranslatorTestHandler> CefCppToC<CefTranslatorTestHandlerCppToC,
CefTranslatorTestHandler, cef_translator_test_handler_t>::UnwrapDerived(
CefWrapperType type, cef_translator_test_handler_t* s) {
if (type == WT_TRANSLATOR_TEST_HANDLER_CHILD) {
return CefTranslatorTestHandlerChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_handler_child_t*>(s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestHandlerCppToC,
CefTranslatorTestHandler, cef_translator_test_handler_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestHandlerCppToC,
CefTranslatorTestHandler, cef_translator_test_handler_t>::kWrapperType =
WT_TRANSLATOR_TEST_HANDLER;

View File

@ -1,169 +0,0 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_object_child_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_object_child_child_t* cef_translator_test_object_child_child_create(
int value, int other_value, int other_other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestObjectChildChild> _retval =
CefTranslatorTestObjectChildChild::Create(
value,
other_value,
other_other_value);
// Return type: refptr_same
return CefTranslatorTestObjectChildChildCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_object_child_child_get_other_other_value(
struct _cef_translator_test_object_child_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestObjectChildChildCppToC::Get(
self)->GetOtherOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_object_child_child_set_other_other_value(
struct _cef_translator_test_object_child_child_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestObjectChildChildCppToC::Get(self)->SetOtherOtherValue(
value);
}
int CEF_CALLBACK translator_test_object_child_child_get_other_value(
struct _cef_translator_test_object_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestObjectChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_object_child_child_t*>(
self))->GetOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_object_child_child_set_other_value(
struct _cef_translator_test_object_child_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestObjectChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_object_child_child_t*>(
self))->SetOtherValue(
value);
}
int CEF_CALLBACK translator_test_object_child_child_get_value(
struct _cef_translator_test_object_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestObjectChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_object_child_child_t*>(
self))->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_object_child_child_set_value(
struct _cef_translator_test_object_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestObjectChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_object_child_child_t*>(
self))->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestObjectChildChildCppToC::CefTranslatorTestObjectChildChildCppToC(
) {
GetStruct()->get_other_other_value =
translator_test_object_child_child_get_other_other_value;
GetStruct()->set_other_other_value =
translator_test_object_child_child_set_other_other_value;
GetStruct()->base.get_other_value =
translator_test_object_child_child_get_other_value;
GetStruct()->base.set_other_value =
translator_test_object_child_child_set_other_value;
GetStruct()->base.base.get_value =
translator_test_object_child_child_get_value;
GetStruct()->base.base.set_value =
translator_test_object_child_child_set_value;
}
template<> CefRefPtr<CefTranslatorTestObjectChildChild> CefCppToC<CefTranslatorTestObjectChildChildCppToC,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t>::UnwrapDerived(
CefWrapperType type, cef_translator_test_object_child_child_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestObjectChildChildCppToC,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestObjectChildChildCppToC,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD;

View File

@ -1,129 +0,0 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_object_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_object_child_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_object_child_t* cef_translator_test_object_child_create(
int value, int other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestObjectChild> _retval =
CefTranslatorTestObjectChild::Create(
value,
other_value);
// Return type: refptr_same
return CefTranslatorTestObjectChildCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_object_child_get_other_value(
struct _cef_translator_test_object_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestObjectChildCppToC::Get(self)->GetOtherValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_object_child_set_other_value(
struct _cef_translator_test_object_child_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestObjectChildCppToC::Get(self)->SetOtherValue(
value);
}
int CEF_CALLBACK translator_test_object_child_get_value(
struct _cef_translator_test_object_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestObjectChildCppToC::Get(
reinterpret_cast<cef_translator_test_object_child_t*>(self))->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_object_child_set_value(
struct _cef_translator_test_object_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestObjectChildCppToC::Get(
reinterpret_cast<cef_translator_test_object_child_t*>(self))->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestObjectChildCppToC::CefTranslatorTestObjectChildCppToC() {
GetStruct()->get_other_value = translator_test_object_child_get_other_value;
GetStruct()->set_other_value = translator_test_object_child_set_other_value;
GetStruct()->base.get_value = translator_test_object_child_get_value;
GetStruct()->base.set_value = translator_test_object_child_set_value;
}
template<> CefRefPtr<CefTranslatorTestObjectChild> CefCppToC<CefTranslatorTestObjectChildCppToC,
CefTranslatorTestObjectChild,
cef_translator_test_object_child_t>::UnwrapDerived(CefWrapperType type,
cef_translator_test_object_child_t* s) {
if (type == WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD) {
return CefTranslatorTestObjectChildChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_object_child_child_t*>(s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestObjectChildCppToC,
CefTranslatorTestObjectChild,
cef_translator_test_object_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestObjectChildCppToC,
CefTranslatorTestObjectChild,
cef_translator_test_object_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_OBJECT_CHILD;

View File

@ -1,97 +0,0 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_object_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_object_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_object_child_child_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_translator_test_object_t* cef_translator_test_object_create(
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestObject> _retval = CefTranslatorTestObject::Create(
value);
// Return type: refptr_same
return CefTranslatorTestObjectCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_object_get_value(
struct _cef_translator_test_object_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestObjectCppToC::Get(self)->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_object_set_value(
struct _cef_translator_test_object_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestObjectCppToC::Get(self)->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestObjectCppToC::CefTranslatorTestObjectCppToC() {
GetStruct()->get_value = translator_test_object_get_value;
GetStruct()->set_value = translator_test_object_set_value;
}
template<> CefRefPtr<CefTranslatorTestObject> CefCppToC<CefTranslatorTestObjectCppToC,
CefTranslatorTestObject, cef_translator_test_object_t>::UnwrapDerived(
CefWrapperType type, cef_translator_test_object_t* s) {
if (type == WT_TRANSLATOR_TEST_OBJECT_CHILD) {
return CefTranslatorTestObjectChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_object_child_t*>(s));
}
if (type == WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD) {
return CefTranslatorTestObjectChildChildCppToC::Unwrap(
reinterpret_cast<cef_translator_test_object_child_child_t*>(s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestObjectCppToC,
CefTranslatorTestObject, cef_translator_test_object_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestObjectCppToC,
CefTranslatorTestObject, cef_translator_test_object_t>::kWrapperType =
WT_TRANSLATOR_TEST_OBJECT;

View File

@ -0,0 +1,82 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_ref_ptr_client_child_get_other_value(
struct _cef_translator_test_ref_ptr_client_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrClientChildCppToC::Get(
self)->GetOtherValue();
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_ref_ptr_client_child_get_value(
struct _cef_translator_test_ref_ptr_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrClientChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_client_child_t*>(
self))->GetValue();
// Return type: simple
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
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> CefCppToC<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 CefCppToC<CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD;

View File

@ -10,8 +10,8 @@
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_HANDLER_CPPTOC_H_
#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_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
@ -24,11 +24,12 @@
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestHandlerCppToC
: public CefCppToC<CefTranslatorTestHandlerCppToC, CefTranslatorTestHandler,
cef_translator_test_handler_t> {
class CefTranslatorTestRefPtrClientChildCppToC
: public CefCppToC<CefTranslatorTestRefPtrClientChildCppToC,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t> {
public:
CefTranslatorTestHandlerCppToC();
CefTranslatorTestRefPtrClientChildCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_HANDLER_CPPTOC_H_
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CPPTOC_H_

View File

@ -0,0 +1,66 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_ref_ptr_client_get_value(
struct _cef_translator_test_ref_ptr_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrClientCppToC::Get(self)->GetValue();
// Return type: simple
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrClientCppToC::CefTranslatorTestRefPtrClientCppToC() {
GetStruct()->get_value = translator_test_ref_ptr_client_get_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrClient> CefCppToC<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));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_CLIENT;

View File

@ -10,8 +10,8 @@
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_HANDLER_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_HANDLER_CHILD_CPPTOC_H_
#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_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
@ -24,11 +24,11 @@
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestHandlerChildCppToC
: public CefCppToC<CefTranslatorTestHandlerChildCppToC,
CefTranslatorTestHandlerChild, cef_translator_test_handler_child_t> {
class CefTranslatorTestRefPtrClientCppToC
: public CefCppToC<CefTranslatorTestRefPtrClientCppToC,
CefTranslatorTestRefPtrClient, cef_translator_test_ref_ptr_client_t> {
public:
CefTranslatorTestHandlerChildCppToC();
CefTranslatorTestRefPtrClientCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_HANDLER_CHILD_CPPTOC_H_
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CPPTOC_H_

View File

@ -0,0 +1,171 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild> _retval =
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(
struct _cef_translator_test_ref_ptr_library_child_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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(
struct _cef_translator_test_ref_ptr_library_child_child_t* self,
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(self)->SetOtherOtherValue(
value);
}
int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_other_value(
struct _cef_translator_test_ref_ptr_library_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))->SetOtherValue(
value);
}
int CEF_CALLBACK translator_test_ref_ptr_library_child_child_get_value(
struct _cef_translator_test_ref_ptr_library_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestRefPtrLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
self))->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryChildChildCppToC::CefTranslatorTestRefPtrLibraryChildChildCppToC(
) {
GetStruct()->get_other_other_value =
translator_test_ref_ptr_library_child_child_get_other_other_value;
GetStruct()->set_other_other_value =
translator_test_ref_ptr_library_child_child_set_other_other_value;
GetStruct()->base.get_other_value =
translator_test_ref_ptr_library_child_child_get_other_value;
GetStruct()->base.set_other_value =
translator_test_ref_ptr_library_child_child_set_other_value;
GetStruct()->base.base.get_value =
translator_test_ref_ptr_library_child_child_get_value;
GetStruct()->base.base.set_value =
translator_test_ref_ptr_library_child_child_set_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild> CefCppToC<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 CefCppToC<CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD;

View File

@ -0,0 +1,35 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#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_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#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 "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestRefPtrLibraryChildChildCppToC
: public CefCppToC<CefTranslatorTestRefPtrLibraryChildChildCppToC,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t> {
public:
CefTranslatorTestRefPtrLibraryChildChildCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CPPTOC_H_

View File

@ -0,0 +1,136 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
#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_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);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryChildCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_ref_ptr_library_child_get_other_value(
struct _cef_translator_test_ref_ptr_library_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestRefPtrLibraryChildCppToC::Get(self)->SetOtherValue(
value);
}
int CEF_CALLBACK translator_test_ref_ptr_library_child_get_value(
struct _cef_translator_test_ref_ptr_library_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestRefPtrLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(
self))->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryChildCppToC::CefTranslatorTestRefPtrLibraryChildCppToC(
) {
GetStruct()->get_other_value =
translator_test_ref_ptr_library_child_get_other_value;
GetStruct()->set_other_value =
translator_test_ref_ptr_library_child_set_other_value;
GetStruct()->base.get_value = translator_test_ref_ptr_library_child_get_value;
GetStruct()->base.set_value = translator_test_ref_ptr_library_child_set_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrLibraryChild> CefCppToC<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));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD;

View File

@ -10,8 +10,8 @@
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CHILD_CPPTOC_H_
#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_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
@ -24,12 +24,12 @@
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestObjectChildChildCppToC
: public CefCppToC<CefTranslatorTestObjectChildChildCppToC,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t> {
class CefTranslatorTestRefPtrLibraryChildCppToC
: public CefCppToC<CefTranslatorTestRefPtrLibraryChildCppToC,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t> {
public:
CefTranslatorTestObjectChildChildCppToC();
CefTranslatorTestRefPtrLibraryChildCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CHILD_CPPTOC_H_
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CPPTOC_H_

View File

@ -0,0 +1,102 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/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"
// 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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefRefPtr<CefTranslatorTestRefPtrLibrary> _retval =
CefTranslatorTestRefPtrLibrary::Create(
value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_ref_ptr_library_get_value(
struct _cef_translator_test_ref_ptr_library_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestRefPtrLibraryCppToC::Get(self)->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_ref_ptr_library_set_value(
struct _cef_translator_test_ref_ptr_library_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestRefPtrLibraryCppToC::Get(self)->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryCppToC::CefTranslatorTestRefPtrLibraryCppToC() {
GetStruct()->get_value = translator_test_ref_ptr_library_get_value;
GetStruct()->set_value = translator_test_ref_ptr_library_set_value;
}
template<> CefRefPtr<CefTranslatorTestRefPtrLibrary> CefCppToC<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));
}
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));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToC<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY;

View File

@ -10,8 +10,8 @@
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CPPTOC_H_
#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_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
@ -24,11 +24,12 @@
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestObjectCppToC
: public CefCppToC<CefTranslatorTestObjectCppToC, CefTranslatorTestObject,
cef_translator_test_object_t> {
class CefTranslatorTestRefPtrLibraryCppToC
: public CefCppToC<CefTranslatorTestRefPtrLibraryCppToC,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t> {
public:
CefTranslatorTestObjectCppToC();
CefTranslatorTestRefPtrLibraryCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CPPTOC_H_
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CPPTOC_H_

View File

@ -0,0 +1,90 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_scoped_client_child_get_other_value(
struct _cef_translator_test_scoped_client_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestScopedClientChildCppToC::Get(
self)->GetOtherValue();
// Return type: simple
return _retval;
}
int CEF_CALLBACK translator_test_scoped_client_child_get_value(
struct _cef_translator_test_scoped_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestScopedClientChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(
self))->GetValue();
// Return type: simple
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
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) {
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) {
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;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedClientChildCppToC,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD;

View File

@ -0,0 +1,35 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#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_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#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 "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> {
public:
CefTranslatorTestScopedClientChildCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CPPTOC_H_

View File

@ -0,0 +1,79 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_scoped_client_get_value(
struct _cef_translator_test_scoped_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestScopedClientCppToC::Get(self)->GetValue();
// Return type: simple
return _retval;
}
} // 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) {
if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
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) {
if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
return CefTranslatorTestScopedClientChildCppToC::UnwrapRaw(
reinterpret_cast<cef_translator_test_scoped_client_child_t*>(s));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
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;

View File

@ -0,0 +1,34 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#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 "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> {
public:
CefTranslatorTestScopedClientCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_

View File

@ -0,0 +1,179 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> _retval =
CefTranslatorTestScopedLibraryChildChild::Create(
value,
other_value,
other_other_value);
// Return type: ownptr_same
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(
struct _cef_translator_test_scoped_library_child_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryChildChildCppToC::Get(
self)->GetOtherOtherValue();
// Return type: simple
return _retval;
}
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
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestScopedLibraryChildChildCppToC::Get(self)->SetOtherOtherValue(
value);
}
int CEF_CALLBACK translator_test_scoped_library_child_child_get_other_value(
struct _cef_translator_test_scoped_library_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))->SetOtherValue(
value);
}
int CEF_CALLBACK translator_test_scoped_library_child_child_get_value(
struct _cef_translator_test_scoped_library_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestScopedLibraryChildChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
self))->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryChildChildCppToC::CefTranslatorTestScopedLibraryChildChildCppToC(
) {
GetStruct()->get_other_other_value =
translator_test_scoped_library_child_child_get_other_other_value;
GetStruct()->set_other_other_value =
translator_test_scoped_library_child_child_set_other_other_value;
GetStruct()->base.get_other_value =
translator_test_scoped_library_child_child_get_other_value;
GetStruct()->base.set_other_value =
translator_test_scoped_library_child_child_set_other_value;
GetStruct()->base.base.get_value =
translator_test_scoped_library_child_child_get_value;
GetStruct()->base.base.set_value =
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) {
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) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD;

View File

@ -0,0 +1,35 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#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_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#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 "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> {
public:
CefTranslatorTestScopedLibraryChildChildCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CPPTOC_H_

View File

@ -0,0 +1,150 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h"
#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_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);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryChildCppToC::WrapOwn(OWN_PASS(_retval));
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_scoped_library_child_get_other_value(
struct _cef_translator_test_scoped_library_child_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestScopedLibraryChildCppToC::Get(self)->SetOtherValue(
value);
}
int CEF_CALLBACK translator_test_scoped_library_child_get_value(
struct _cef_translator_test_scoped_library_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
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) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestScopedLibraryChildCppToC::Get(
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
self))->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryChildCppToC::CefTranslatorTestScopedLibraryChildCppToC(
) {
GetStruct()->get_other_value =
translator_test_scoped_library_child_get_other_value;
GetStruct()->set_other_value =
translator_test_scoped_library_child_set_other_value;
GetStruct()->base.get_value = translator_test_scoped_library_child_get_value;
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) {
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)),
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) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return CefTranslatorTestScopedLibraryChildChildCppToC::UnwrapRaw(
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;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedLibraryChildCppToC,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD;

View File

@ -0,0 +1,35 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#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_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#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 "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> {
public:
CefTranslatorTestScopedLibraryChildCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CPPTOC_H_

View File

@ -0,0 +1,121 @@
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/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"
// GLOBAL FUNCTIONS - Body may be edited by hand.
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);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCppToC::WrapOwn(OWN_PASS(_retval));
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK translator_test_scoped_library_get_value(
struct _cef_translator_test_scoped_library_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTranslatorTestScopedLibraryCppToC::Get(self)->GetValue();
// Return type: simple
return _retval;
}
void CEF_CALLBACK translator_test_scoped_library_set_value(
struct _cef_translator_test_scoped_library_t* self, int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTranslatorTestScopedLibraryCppToC::Get(self)->SetValue(
value);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryCppToC::CefTranslatorTestScopedLibraryCppToC() {
GetStruct()->get_value = translator_test_scoped_library_get_value;
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) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD) {
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)),
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) {
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));
}
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;
#endif
template<> CefWrapperType CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY;

View File

@ -10,8 +10,8 @@
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CPPTOC_H_
#ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
@ -20,15 +20,16 @@
#include "include/test/cef_translator_test.h"
#include "include/capi/test/cef_translator_test_capi.h"
#include "libcef_dll/cpptoc/cpptoc.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 CefTranslatorTestObjectChildCppToC
: public CefCppToC<CefTranslatorTestObjectChildCppToC,
CefTranslatorTestObjectChild, cef_translator_test_object_child_t> {
class CefTranslatorTestScopedLibraryCppToC
: public CefCppToCScoped<CefTranslatorTestScopedLibraryCppToC,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t> {
public:
CefTranslatorTestObjectChildCppToC();
CefTranslatorTestScopedLibraryCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CPPTOC_H_
#endif // CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_