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

@@ -41,21 +41,25 @@ void CefAppCToCpp::OnBeforeCommandLineProcessing(const CefString& process_type,
}
void CefAppCToCpp::OnRegisterCustomSchemes(
CefRefPtr<CefSchemeRegistrar> registrar) {
CefRawPtr<CefSchemeRegistrar> registrar) {
cef_app_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_register_custom_schemes))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: registrar; type: refptr_diff
DCHECK(registrar.get());
if (!registrar.get())
// Verify param: registrar; type: rawptr_diff
DCHECK(registrar);
if (!registrar)
return;
// Translate param: registrar; type: rawptr_diff
CefOwnPtr<CefSchemeRegistrarCppToC> registrarPtr(
CefSchemeRegistrarCppToC::WrapRaw(registrar));
// Execute
_struct->on_register_custom_schemes(_struct,
CefSchemeRegistrarCppToC::Wrap(registrar));
registrarPtr->GetStruct());
}
CefRefPtr<CefResourceBundleHandler> CefAppCToCpp::GetResourceBundleHandler() {

View File

@@ -33,7 +33,7 @@ class CefAppCToCpp
void OnBeforeCommandLineProcessing(const CefString& process_type,
CefRefPtr<CefCommandLine> command_line) override;
void OnRegisterCustomSchemes(
CefRefPtr<CefSchemeRegistrar> registrar) override;
CefRawPtr<CefSchemeRegistrar> registrar) override;
CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() override;
CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() override;
CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() override;

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/ctocpp/base_scoped_ctocpp.h"
CefBaseScopedCToCpp::CefBaseScopedCToCpp() {
}
template<> cef_base_scoped_t*
CefCToCppScoped<CefBaseScopedCToCpp, CefBaseScoped, cef_base_scoped_t>::
UnwrapDerivedOwn(CefWrapperType type, CefOwnPtr<CefBaseScoped> c) {
NOTREACHED();
return NULL;
}
template<> cef_base_scoped_t*
CefCToCppScoped<CefBaseScopedCToCpp, CefBaseScoped, cef_base_scoped_t>::
UnwrapDerivedRaw(CefWrapperType type, CefRawPtr<CefBaseScoped> c) {
NOTREACHED();
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppScoped<CefBaseScopedCToCpp,
CefBaseScoped, cef_base_scoped_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppScoped<CefBaseScopedCToCpp,
CefBaseScoped, cef_base_scoped_t>::kWrapperType = WT_BASE;

View File

@@ -0,0 +1,25 @@
// 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_CTOCPP_BASE_SCOPED_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_BASE_SCOPED_CTOCPP_H_
#pragma once
#include "include/cef_base.h"
#include "include/capi/cef_base_capi.h"
#include "libcef_dll/ctocpp/ctocpp_scoped.h"
#if !defined(BUILDING_CEF_SHARED)
#error This file can be included DLL-side only
#endif
// Wrap a C structure with a C++ class.
class CefBaseScopedCToCpp
: public CefCToCppScoped<CefBaseScopedCToCpp, CefBaseScoped,
cef_base_scoped_t> {
public:
CefBaseScopedCToCpp();
};
#endif // CEF_LIBCEF_DLL_CTOCPP_BASE_SCOPED_CTOCPP_H_

View File

@@ -26,16 +26,6 @@ class CefCToCpp : public BaseName {
// return back to the other side.
static StructName* Unwrap(CefRefPtr<BaseName> c);
// If returning the structure across the DLL boundary you should call
// UnderlyingAddRef() on this wrapping CefCToCpp object. On the other side of
// the DLL boundary, call Release() on the CefCppToC object.
StructName* GetStruct() const {
WrapperStruct* wrapperStruct = GetWrapperStruct(this);
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
return wrapperStruct->struct_;
}
// CefBase methods increment/decrement reference counts on both this object
// and the underlying wrapped structure.
void AddRef() const {
@@ -63,6 +53,14 @@ class CefCToCpp : public BaseName {
#endif
}
// If returning the structure across the DLL boundary use Unwrap() instead.
StructName* GetStruct() const {
WrapperStruct* wrapperStruct = GetWrapperStruct(this);
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
return wrapperStruct->struct_;
}
private:
// Used to associate this wrapper object and the structure reference received
// from the other side.

View File

@@ -0,0 +1,211 @@
// 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_CTOCPP_CTOCPP_SCOPED_H_
#define CEF_LIBCEF_DLL_CTOCPP_CTOCPP_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 structure with a C++ class. This is used when the implementation
// exists on the other side of the DLL boundary but will have methods called on
// this side of the DLL boundary.
template <class ClassName, class BaseName, class StructName>
class CefCToCppScoped : public BaseName {
public:
// Create a new wrapper instance for a structure reference received from the
// other side. The caller owns the CToCpp wrapper instance but not necessarily
// the underling object on the CppToC side (depends if s->del is non-NULL).
// The returned wrapper object can be used as either a scoped argument or to
// pass ownership. For example:
//
// void my_method(my_type1_t* struct1, my_type2_t* struct2) {
// // Passes ownership to MyMethod1().
// MyMethod1(MyType1CToCpp::Wrap(struct1));
//
// // Passes reference to MyMethod2().
// CefOwnPtr<MyType1> obj2 = MyType2CToCpp::Wrap(struct2);
// MyMethod2(obj2.get());
// // |obj2| is deleted when my_method() goes out of scope.
// }
//
// void MyMethod1(CefOwnPtr<MyType1> obj1) {
// // |obj1| is deleted when MyMethod1() goes out of scope.
// }
//
// void MyMethod2(CefRawPtr<MyType2> obj2) {
// }
static CefOwnPtr<BaseName> Wrap(StructName* s);
// Retrieve the underlying structure reference from a wrapper instance for
// return back to the other side. Ownership will be passed back to the other
// side and the wrapper will be deleted. For example:
//
// void MyMethod(CefOwnPtr<MyType> obj) {
// // Ownership of the underlying MyType object is passed to my_method().
// my_method(MyTypeCToCpp::UnwrapOwn(obj.Pass()));
// // |obj| is now NULL.
// }
static StructName* UnwrapOwn(CefOwnPtr<BaseName> c);
// Retrieve the underlying structure reference from a wrapper instance for
// return back to the other side. Ownership does not change. For example:
//
// void MyMethod(CefRawPtr<MyType> obj) {
// // A reference is passed to my_method(). Ownership does not change.
// my_method2(MyTypeCToCpp::UnwrapRaw(obj));
// }
static StructName* UnwrapRaw(CefRawPtr<BaseName> c);
// Override delete operator to properly delete the WrapperStruct.
// ~CefCToCppScoped will be called first followed by this method.
static void operator delete(void* ptr);
#if DCHECK_IS_ON()
// Simple tracking of allocated objects.
static base::AtomicRefCount DebugObjCt; // NOLINT(runtime/int)
#endif
protected:
CefCToCppScoped() {
#if DCHECK_IS_ON()
base::AtomicRefCountInc(&DebugObjCt);
#endif
}
virtual ~CefCToCppScoped() {
#if DCHECK_IS_ON()
base::AtomicRefCountDec(&DebugObjCt);
#endif
}
// If returning the structure across the DLL boundary use Unwrap() instead.
StructName* GetStruct() const {
WrapperStruct* wrapperStruct = GetWrapperStruct(this);
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
return wrapperStruct->struct_;
}
private:
// Used to associate this wrapper object and the structure reference received
// from the other side.
struct WrapperStruct;
static WrapperStruct* GetWrapperStruct(const BaseName* obj);
// Unwrap as the derived type.
static StructName* UnwrapDerivedOwn(CefWrapperType type,
CefOwnPtr<BaseName> c);
static StructName* UnwrapDerivedRaw(CefWrapperType type,
CefRawPtr<BaseName> c);
static CefWrapperType kWrapperType;
DISALLOW_COPY_AND_ASSIGN(CefCToCppScoped);
};
template <class ClassName, class BaseName, class StructName>
struct CefCToCppScoped<ClassName,BaseName,StructName>::WrapperStruct {
CefWrapperType type_;
StructName* struct_;
ClassName wrapper_;
};
template <class ClassName, class BaseName, class StructName>
CefOwnPtr<BaseName> CefCToCppScoped<ClassName, BaseName, StructName>::Wrap(
StructName* s) {
if (!s)
return CefOwnPtr<BaseName>();
// Wrap their structure with the CefCToCpp object.
WrapperStruct* wrapperStruct = new WrapperStruct;
wrapperStruct->type_ = kWrapperType;
wrapperStruct->struct_ = s;
return CefOwnPtr<BaseName>(&wrapperStruct->wrapper_);
}
template <class ClassName, class BaseName, class StructName>
StructName* CefCToCppScoped<ClassName, BaseName, StructName>::UnwrapOwn(
CefOwnPtr<BaseName> c) {
if (!c.get())
return NULL;
WrapperStruct* wrapperStruct = GetWrapperStruct(c.get());
// 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_, OWN_PASS(c));
StructName* orig_struct = wrapperStruct->struct_;
// We should own the object currently.
cef_base_scoped_t* base = reinterpret_cast<cef_base_scoped_t*>(orig_struct);
DCHECK(base && base->del);
// Don't delete the original object when the wrapper is deleted.
wrapperStruct->struct_ = NULL;
// Return the original structure.
return orig_struct;
// The wrapper |c| is deleted when this method goes out of scope.
}
template <class ClassName, class BaseName, class StructName>
StructName* CefCToCppScoped<ClassName, BaseName, StructName>::UnwrapRaw(
CefRawPtr<BaseName> c) {
if (!c)
return NULL;
WrapperStruct* wrapperStruct = GetWrapperStruct(c);
// 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_, c);
// Return the original structure.
return wrapperStruct->struct_;
}
template <class ClassName, class BaseName, class StructName>
void CefCToCppScoped<ClassName, BaseName, StructName>::operator delete(
void* ptr) {
WrapperStruct* wrapperStruct = GetWrapperStruct(static_cast<BaseName*>(ptr));
// Verify that the wrapper offset was calculated correctly.
DCHECK_EQ(kWrapperType, wrapperStruct->type_);
// May be NULL if UnwrapOwn() was called.
cef_base_scoped_t* base =
reinterpret_cast<cef_base_scoped_t*>(wrapperStruct->struct_);
// If we own the object (base->del != NULL) then notify the other side that
// the object has been deleted.
if (base && base->del)
base->del(base);
// Delete the wrapper structure without executing ~CefCToCppScoped() an
// additional time.
::operator delete(wrapperStruct);
}
template <class ClassName, class BaseName, class StructName>
typename CefCToCppScoped<ClassName, BaseName, StructName>::WrapperStruct*
CefCToCppScoped<ClassName, BaseName, StructName>::GetWrapperStruct(
const BaseName* obj) {
// 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*>(const_cast<BaseName*>(obj)) -
(sizeof(WrapperStruct) - sizeof(ClassName)));
}
#endif // CEF_LIBCEF_DLL_CTOCPP_CTOCPP_SCOPED_H_

View File

@@ -48,18 +48,25 @@ bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name,
CefSchemeRegistrarCToCpp::CefSchemeRegistrarCToCpp() {
}
template<> cef_scheme_registrar_t* CefCToCpp<CefSchemeRegistrarCToCpp,
CefSchemeRegistrar, cef_scheme_registrar_t>::UnwrapDerived(
CefWrapperType type, CefSchemeRegistrar* c) {
template<> cef_scheme_registrar_t* CefCToCppScoped<CefSchemeRegistrarCToCpp,
CefSchemeRegistrar, cef_scheme_registrar_t>::UnwrapDerivedOwn(
CefWrapperType type, CefOwnPtr<CefSchemeRegistrar> c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template<> cef_scheme_registrar_t* CefCToCppScoped<CefSchemeRegistrarCToCpp,
CefSchemeRegistrar, cef_scheme_registrar_t>::UnwrapDerivedRaw(
CefWrapperType type, CefRawPtr<CefSchemeRegistrar> c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefSchemeRegistrarCToCpp,
template<> base::AtomicRefCount CefCToCppScoped<CefSchemeRegistrarCToCpp,
CefSchemeRegistrar, cef_scheme_registrar_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefSchemeRegistrarCToCpp,
template<> CefWrapperType CefCToCppScoped<CefSchemeRegistrarCToCpp,
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/ctocpp/ctocpp.h"
#include "libcef_dll/ctocpp/ctocpp_scoped.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefSchemeRegistrarCToCpp
: public CefCToCpp<CefSchemeRegistrarCToCpp, CefSchemeRegistrar,
: public CefCToCppScoped<CefSchemeRegistrarCToCpp, CefSchemeRegistrar,
cef_scheme_registrar_t> {
public:
CefSchemeRegistrarCToCpp();

View File

@@ -11,11 +11,15 @@
//
#include <algorithm>
#include "libcef_dll/cpptoc/test/translator_test_handler_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_handler_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h"
#include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h"
#include "libcef_dll/ctocpp/test/translator_test_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_object_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_object_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h"
#include "libcef_dll/transfer_util.h"
@@ -632,24 +636,27 @@ size_t CefTranslatorTestCToCpp::GetPointListSize() {
return _retval;
}
CefRefPtr<CefTranslatorTestObject> CefTranslatorTestCToCpp::GetObject(int val) {
CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestCToCpp::GetRefPtrLibrary(
int val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_object))
if (CEF_MEMBER_MISSING(_struct, get_ref_ptr_library))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_object_t* _retval = _struct->get_object(_struct,
cef_translator_test_ref_ptr_library_t* _retval = _struct->get_ref_ptr_library(
_struct,
val);
// Return type: refptr_same
return CefTranslatorTestObjectCToCpp::Wrap(_retval);
return CefTranslatorTestRefPtrLibraryCToCpp::Wrap(_retval);
}
int CefTranslatorTestCToCpp::SetObject(CefRefPtr<CefTranslatorTestObject> val) {
int CefTranslatorTestCToCpp::SetRefPtrLibrary(
CefRefPtr<CefTranslatorTestRefPtrLibrary> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_object))
if (CEF_MEMBER_MISSING(_struct, set_ref_ptr_library))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -660,17 +667,17 @@ int CefTranslatorTestCToCpp::SetObject(CefRefPtr<CefTranslatorTestObject> val) {
return 0;
// Execute
int _retval = _struct->set_object(_struct,
CefTranslatorTestObjectCToCpp::Unwrap(val));
int _retval = _struct->set_ref_ptr_library(_struct,
CefTranslatorTestRefPtrLibraryCToCpp::Unwrap(val));
// Return type: simple
return _retval;
}
CefRefPtr<CefTranslatorTestObject> CefTranslatorTestCToCpp::SetObjectAndReturn(
CefRefPtr<CefTranslatorTestObject> val) {
CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestCToCpp::SetRefPtrLibraryAndReturn(
CefRefPtr<CefTranslatorTestRefPtrLibrary> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_object_and_return))
if (CEF_MEMBER_MISSING(_struct, set_ref_ptr_library_and_return))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -681,18 +688,18 @@ CefRefPtr<CefTranslatorTestObject> CefTranslatorTestCToCpp::SetObjectAndReturn(
return NULL;
// Execute
cef_translator_test_object_t* _retval = _struct->set_object_and_return(
_struct,
CefTranslatorTestObjectCToCpp::Unwrap(val));
cef_translator_test_ref_ptr_library_t* _retval =
_struct->set_ref_ptr_library_and_return(_struct,
CefTranslatorTestRefPtrLibraryCToCpp::Unwrap(val));
// Return type: refptr_same
return CefTranslatorTestObjectCToCpp::Wrap(_retval);
return CefTranslatorTestRefPtrLibraryCToCpp::Wrap(_retval);
}
int CefTranslatorTestCToCpp::SetChildObject(
CefRefPtr<CefTranslatorTestObjectChild> val) {
int CefTranslatorTestCToCpp::SetChildRefPtrLibrary(
CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_object))
if (CEF_MEMBER_MISSING(_struct, set_child_ref_ptr_library))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -703,17 +710,17 @@ int CefTranslatorTestCToCpp::SetChildObject(
return 0;
// Execute
int _retval = _struct->set_child_object(_struct,
CefTranslatorTestObjectChildCToCpp::Unwrap(val));
int _retval = _struct->set_child_ref_ptr_library(_struct,
CefTranslatorTestRefPtrLibraryChildCToCpp::Unwrap(val));
// Return type: simple
return _retval;
}
CefRefPtr<CefTranslatorTestObject> CefTranslatorTestCToCpp::SetChildObjectAndReturnParent(
CefRefPtr<CefTranslatorTestObjectChild> val) {
CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestCToCpp::SetChildRefPtrLibraryAndReturnParent(
CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_object_and_return_parent))
if (CEF_MEMBER_MISSING(_struct, set_child_ref_ptr_library_and_return_parent))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -724,38 +731,38 @@ CefRefPtr<CefTranslatorTestObject> CefTranslatorTestCToCpp::SetChildObjectAndRet
return NULL;
// Execute
cef_translator_test_object_t* _retval =
_struct->set_child_object_and_return_parent(_struct,
CefTranslatorTestObjectChildCToCpp::Unwrap(val));
cef_translator_test_ref_ptr_library_t* _retval =
_struct->set_child_ref_ptr_library_and_return_parent(_struct,
CefTranslatorTestRefPtrLibraryChildCToCpp::Unwrap(val));
// Return type: refptr_same
return CefTranslatorTestObjectCToCpp::Wrap(_retval);
return CefTranslatorTestRefPtrLibraryCToCpp::Wrap(_retval);
}
bool CefTranslatorTestCToCpp::SetObjectList(
const std::vector<CefRefPtr<CefTranslatorTestObject>>& val, int val1,
bool CefTranslatorTestCToCpp::SetRefPtrLibraryList(
const std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>>& val, int val1,
int val2) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_object_list))
if (CEF_MEMBER_MISSING(_struct, set_ref_ptr_library_list))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: val; type: refptr_vec_same_byref_const
const size_t valCount = val.size();
cef_translator_test_object_t** valList = NULL;
cef_translator_test_ref_ptr_library_t** valList = NULL;
if (valCount > 0) {
valList = new cef_translator_test_object_t*[valCount];
valList = new cef_translator_test_ref_ptr_library_t*[valCount];
DCHECK(valList);
if (valList) {
for (size_t i = 0; i < valCount; ++i) {
valList[i] = CefTranslatorTestObjectCToCpp::Unwrap(val[i]);
valList[i] = CefTranslatorTestRefPtrLibraryCToCpp::Unwrap(val[i]);
}
}
}
// Execute
int _retval = _struct->set_object_list(_struct,
int _retval = _struct->set_ref_ptr_library_list(_struct,
valCount,
valList,
val1,
@@ -769,33 +776,34 @@ bool CefTranslatorTestCToCpp::SetObjectList(
return _retval?true:false;
}
bool CefTranslatorTestCToCpp::GetObjectListByRef(ObjectList& val, int val1,
int val2) {
bool CefTranslatorTestCToCpp::GetRefPtrLibraryListByRef(RefPtrLibraryList& val,
int val1, int val2) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_object_list_by_ref))
if (CEF_MEMBER_MISSING(_struct, get_ref_ptr_library_list_by_ref))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: val; type: refptr_vec_same_byref
size_t valSize = val.size();
size_t valCount = std::max(GetObjectListSize(), valSize);
cef_translator_test_object_t** valList = NULL;
size_t valCount = std::max(GetRefPtrLibraryListSize(), valSize);
cef_translator_test_ref_ptr_library_t** valList = NULL;
if (valCount > 0) {
valList = new cef_translator_test_object_t*[valCount];
valList = new cef_translator_test_ref_ptr_library_t*[valCount];
DCHECK(valList);
if (valList) {
memset(valList, 0, sizeof(cef_translator_test_object_t*)*valCount);
memset(valList, 0, sizeof(
cef_translator_test_ref_ptr_library_t*)*valCount);
}
if (valList && valSize > 0) {
for (size_t i = 0; i < valSize; ++i) {
valList[i] = CefTranslatorTestObjectCToCpp::Unwrap(val[i]);
valList[i] = CefTranslatorTestRefPtrLibraryCToCpp::Unwrap(val[i]);
}
}
}
// Execute
int _retval = _struct->get_object_list_by_ref(_struct,
int _retval = _struct->get_ref_ptr_library_list_by_ref(_struct,
&valCount,
valList,
val1,
@@ -805,7 +813,7 @@ bool CefTranslatorTestCToCpp::GetObjectListByRef(ObjectList& val, int val1,
val.clear();
if (valCount > 0 && valList) {
for (size_t i = 0; i < valCount; ++i) {
val.push_back(CefTranslatorTestObjectCToCpp::Wrap(valList[i]));
val.push_back(CefTranslatorTestRefPtrLibraryCToCpp::Wrap(valList[i]));
}
delete [] valList;
}
@@ -814,24 +822,24 @@ bool CefTranslatorTestCToCpp::GetObjectListByRef(ObjectList& val, int val1,
return _retval?true:false;
}
size_t CefTranslatorTestCToCpp::GetObjectListSize() {
size_t CefTranslatorTestCToCpp::GetRefPtrLibraryListSize() {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_object_list_size))
if (CEF_MEMBER_MISSING(_struct, get_ref_ptr_library_list_size))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
size_t _retval = _struct->get_object_list_size(_struct);
size_t _retval = _struct->get_ref_ptr_library_list_size(_struct);
// Return type: simple
return _retval;
}
int CefTranslatorTestCToCpp::SetHandler(
CefRefPtr<CefTranslatorTestHandler> val) {
int CefTranslatorTestCToCpp::SetRefPtrClient(
CefRefPtr<CefTranslatorTestRefPtrClient> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_handler))
if (CEF_MEMBER_MISSING(_struct, set_ref_ptr_client))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -842,17 +850,17 @@ int CefTranslatorTestCToCpp::SetHandler(
return 0;
// Execute
int _retval = _struct->set_handler(_struct,
CefTranslatorTestHandlerCppToC::Wrap(val));
int _retval = _struct->set_ref_ptr_client(_struct,
CefTranslatorTestRefPtrClientCppToC::Wrap(val));
// Return type: simple
return _retval;
}
CefRefPtr<CefTranslatorTestHandler> CefTranslatorTestCToCpp::SetHandlerAndReturn(
CefRefPtr<CefTranslatorTestHandler> val) {
CefRefPtr<CefTranslatorTestRefPtrClient> CefTranslatorTestCToCpp::SetRefPtrClientAndReturn(
CefRefPtr<CefTranslatorTestRefPtrClient> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_handler_and_return))
if (CEF_MEMBER_MISSING(_struct, set_ref_ptr_client_and_return))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -863,18 +871,18 @@ CefRefPtr<CefTranslatorTestHandler> CefTranslatorTestCToCpp::SetHandlerAndReturn
return NULL;
// Execute
cef_translator_test_handler_t* _retval = _struct->set_handler_and_return(
_struct,
CefTranslatorTestHandlerCppToC::Wrap(val));
cef_translator_test_ref_ptr_client_t* _retval =
_struct->set_ref_ptr_client_and_return(_struct,
CefTranslatorTestRefPtrClientCppToC::Wrap(val));
// Return type: refptr_diff
return CefTranslatorTestHandlerCppToC::Unwrap(_retval);
return CefTranslatorTestRefPtrClientCppToC::Unwrap(_retval);
}
int CefTranslatorTestCToCpp::SetChildHandler(
CefRefPtr<CefTranslatorTestHandlerChild> val) {
int CefTranslatorTestCToCpp::SetChildRefPtrClient(
CefRefPtr<CefTranslatorTestRefPtrClientChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_handler))
if (CEF_MEMBER_MISSING(_struct, set_child_ref_ptr_client))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -885,17 +893,17 @@ int CefTranslatorTestCToCpp::SetChildHandler(
return 0;
// Execute
int _retval = _struct->set_child_handler(_struct,
CefTranslatorTestHandlerChildCppToC::Wrap(val));
int _retval = _struct->set_child_ref_ptr_client(_struct,
CefTranslatorTestRefPtrClientChildCppToC::Wrap(val));
// Return type: simple
return _retval;
}
CefRefPtr<CefTranslatorTestHandler> CefTranslatorTestCToCpp::SetChildHandlerAndReturnParent(
CefRefPtr<CefTranslatorTestHandlerChild> val) {
CefRefPtr<CefTranslatorTestRefPtrClient> CefTranslatorTestCToCpp::SetChildRefPtrClientAndReturnParent(
CefRefPtr<CefTranslatorTestRefPtrClientChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_handler_and_return_parent))
if (CEF_MEMBER_MISSING(_struct, set_child_ref_ptr_client_and_return_parent))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -906,38 +914,38 @@ CefRefPtr<CefTranslatorTestHandler> CefTranslatorTestCToCpp::SetChildHandlerAndR
return NULL;
// Execute
cef_translator_test_handler_t* _retval =
_struct->set_child_handler_and_return_parent(_struct,
CefTranslatorTestHandlerChildCppToC::Wrap(val));
cef_translator_test_ref_ptr_client_t* _retval =
_struct->set_child_ref_ptr_client_and_return_parent(_struct,
CefTranslatorTestRefPtrClientChildCppToC::Wrap(val));
// Return type: refptr_diff
return CefTranslatorTestHandlerCppToC::Unwrap(_retval);
return CefTranslatorTestRefPtrClientCppToC::Unwrap(_retval);
}
bool CefTranslatorTestCToCpp::SetHandlerList(
const std::vector<CefRefPtr<CefTranslatorTestHandler>>& val, int val1,
bool CefTranslatorTestCToCpp::SetRefPtrClientList(
const std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>>& val, int val1,
int val2) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_handler_list))
if (CEF_MEMBER_MISSING(_struct, set_ref_ptr_client_list))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: val; type: refptr_vec_diff_byref_const
const size_t valCount = val.size();
cef_translator_test_handler_t** valList = NULL;
cef_translator_test_ref_ptr_client_t** valList = NULL;
if (valCount > 0) {
valList = new cef_translator_test_handler_t*[valCount];
valList = new cef_translator_test_ref_ptr_client_t*[valCount];
DCHECK(valList);
if (valList) {
for (size_t i = 0; i < valCount; ++i) {
valList[i] = CefTranslatorTestHandlerCppToC::Wrap(val[i]);
valList[i] = CefTranslatorTestRefPtrClientCppToC::Wrap(val[i]);
}
}
}
// Execute
int _retval = _struct->set_handler_list(_struct,
int _retval = _struct->set_ref_ptr_client_list(_struct,
valCount,
valList,
val1,
@@ -951,11 +959,11 @@ bool CefTranslatorTestCToCpp::SetHandlerList(
return _retval?true:false;
}
bool CefTranslatorTestCToCpp::GetHandlerListByRef(HandlerList& val,
CefRefPtr<CefTranslatorTestHandler> val1,
CefRefPtr<CefTranslatorTestHandler> val2) {
bool CefTranslatorTestCToCpp::GetRefPtrClientListByRef(RefPtrClientList& val,
CefRefPtr<CefTranslatorTestRefPtrClient> val1,
CefRefPtr<CefTranslatorTestRefPtrClient> val2) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_handler_list_by_ref))
if (CEF_MEMBER_MISSING(_struct, get_ref_ptr_client_list_by_ref))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -971,33 +979,34 @@ bool CefTranslatorTestCToCpp::GetHandlerListByRef(HandlerList& val,
// Translate param: val; type: refptr_vec_diff_byref
size_t valSize = val.size();
size_t valCount = std::max(GetObjectListSize(), valSize);
cef_translator_test_handler_t** valList = NULL;
size_t valCount = std::max(GetRefPtrLibraryListSize(), valSize);
cef_translator_test_ref_ptr_client_t** valList = NULL;
if (valCount > 0) {
valList = new cef_translator_test_handler_t*[valCount];
valList = new cef_translator_test_ref_ptr_client_t*[valCount];
DCHECK(valList);
if (valList) {
memset(valList, 0, sizeof(cef_translator_test_handler_t*)*valCount);
memset(valList, 0, sizeof(
cef_translator_test_ref_ptr_client_t*)*valCount);
}
if (valList && valSize > 0) {
for (size_t i = 0; i < valSize; ++i) {
valList[i] = CefTranslatorTestHandlerCppToC::Wrap(val[i]);
valList[i] = CefTranslatorTestRefPtrClientCppToC::Wrap(val[i]);
}
}
}
// Execute
int _retval = _struct->get_handler_list_by_ref(_struct,
int _retval = _struct->get_ref_ptr_client_list_by_ref(_struct,
&valCount,
valList,
CefTranslatorTestHandlerCppToC::Wrap(val1),
CefTranslatorTestHandlerCppToC::Wrap(val2));
CefTranslatorTestRefPtrClientCppToC::Wrap(val1),
CefTranslatorTestRefPtrClientCppToC::Wrap(val2));
// Restore param:val; type: refptr_vec_diff_byref
val.clear();
if (valCount > 0 && valList) {
for (size_t i = 0; i < valCount; ++i) {
val.push_back(CefTranslatorTestHandlerCppToC::Unwrap(valList[i]));
val.push_back(CefTranslatorTestRefPtrClientCppToC::Unwrap(valList[i]));
}
delete [] valList;
}
@@ -1006,20 +1015,381 @@ bool CefTranslatorTestCToCpp::GetHandlerListByRef(HandlerList& val,
return _retval?true:false;
}
size_t CefTranslatorTestCToCpp::GetHandlerListSize() {
size_t CefTranslatorTestCToCpp::GetRefPtrClientListSize() {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_handler_list_size))
if (CEF_MEMBER_MISSING(_struct, get_ref_ptr_client_list_size))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
size_t _retval = _struct->get_handler_list_size(_struct);
size_t _retval = _struct->get_ref_ptr_client_list_size(_struct);
// Return type: simple
return _retval;
}
CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestCToCpp::GetOwnPtrLibrary(
int val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_own_ptr_library))
return CefOwnPtr<CefTranslatorTestScopedLibrary>();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_scoped_library_t* _retval = _struct->get_own_ptr_library(
_struct,
val);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCToCpp::Wrap(_retval);
}
int CefTranslatorTestCToCpp::SetOwnPtrLibrary(
CefOwnPtr<CefTranslatorTestScopedLibrary> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_own_ptr_library))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_same
DCHECK(val.get());
if (!val.get())
return 0;
// Execute
int _retval = _struct->set_own_ptr_library(_struct,
CefTranslatorTestScopedLibraryCToCpp::UnwrapOwn(OWN_PASS(val)));
// Return type: simple
return _retval;
}
CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestCToCpp::SetOwnPtrLibraryAndReturn(
CefOwnPtr<CefTranslatorTestScopedLibrary> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_own_ptr_library_and_return))
return CefOwnPtr<CefTranslatorTestScopedLibrary>();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_same
DCHECK(val.get());
if (!val.get())
return CefOwnPtr<CefTranslatorTestScopedLibrary>();
// Execute
cef_translator_test_scoped_library_t* _retval =
_struct->set_own_ptr_library_and_return(_struct,
CefTranslatorTestScopedLibraryCToCpp::UnwrapOwn(OWN_PASS(val)));
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCToCpp::Wrap(_retval);
}
int CefTranslatorTestCToCpp::SetChildOwnPtrLibrary(
CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_own_ptr_library))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_same
DCHECK(val.get());
if (!val.get())
return 0;
// Execute
int _retval = _struct->set_child_own_ptr_library(_struct,
CefTranslatorTestScopedLibraryChildCToCpp::UnwrapOwn(OWN_PASS(val)));
// Return type: simple
return _retval;
}
CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestCToCpp::SetChildOwnPtrLibraryAndReturnParent(
CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_own_ptr_library_and_return_parent))
return CefOwnPtr<CefTranslatorTestScopedLibrary>();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_same
DCHECK(val.get());
if (!val.get())
return CefOwnPtr<CefTranslatorTestScopedLibrary>();
// Execute
cef_translator_test_scoped_library_t* _retval =
_struct->set_child_own_ptr_library_and_return_parent(_struct,
CefTranslatorTestScopedLibraryChildCToCpp::UnwrapOwn(OWN_PASS(val)));
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCToCpp::Wrap(_retval);
}
int CefTranslatorTestCToCpp::SetOwnPtrClient(
CefOwnPtr<CefTranslatorTestScopedClient> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_own_ptr_client))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_diff
DCHECK(val.get());
if (!val.get())
return 0;
// Execute
int _retval = _struct->set_own_ptr_client(_struct,
CefTranslatorTestScopedClientCppToC::WrapOwn(OWN_PASS(val)));
// Return type: simple
return _retval;
}
CefOwnPtr<CefTranslatorTestScopedClient> CefTranslatorTestCToCpp::SetOwnPtrClientAndReturn(
CefOwnPtr<CefTranslatorTestScopedClient> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_own_ptr_client_and_return))
return CefOwnPtr<CefTranslatorTestScopedClient>();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_diff
DCHECK(val.get());
if (!val.get())
return CefOwnPtr<CefTranslatorTestScopedClient>();
// Execute
cef_translator_test_scoped_client_t* _retval =
_struct->set_own_ptr_client_and_return(_struct,
CefTranslatorTestScopedClientCppToC::WrapOwn(OWN_PASS(val)));
// Return type: ownptr_diff
return CefTranslatorTestScopedClientCppToC::UnwrapOwn(_retval);
}
int CefTranslatorTestCToCpp::SetChildOwnPtrClient(
CefOwnPtr<CefTranslatorTestScopedClientChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_own_ptr_client))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_diff
DCHECK(val.get());
if (!val.get())
return 0;
// Execute
int _retval = _struct->set_child_own_ptr_client(_struct,
CefTranslatorTestScopedClientChildCppToC::WrapOwn(OWN_PASS(val)));
// Return type: simple
return _retval;
}
CefOwnPtr<CefTranslatorTestScopedClient> CefTranslatorTestCToCpp::SetChildOwnPtrClientAndReturnParent(
CefOwnPtr<CefTranslatorTestScopedClientChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_own_ptr_client_and_return_parent))
return CefOwnPtr<CefTranslatorTestScopedClient>();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: ownptr_diff
DCHECK(val.get());
if (!val.get())
return CefOwnPtr<CefTranslatorTestScopedClient>();
// Execute
cef_translator_test_scoped_client_t* _retval =
_struct->set_child_own_ptr_client_and_return_parent(_struct,
CefTranslatorTestScopedClientChildCppToC::WrapOwn(OWN_PASS(val)));
// Return type: ownptr_diff
return CefTranslatorTestScopedClientCppToC::UnwrapOwn(_retval);
}
int CefTranslatorTestCToCpp::SetRawPtrLibrary(
CefRawPtr<CefTranslatorTestScopedLibrary> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_raw_ptr_library))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: rawptr_same
DCHECK(val);
if (!val)
return 0;
// Execute
int _retval = _struct->set_raw_ptr_library(_struct,
CefTranslatorTestScopedLibraryCToCpp::UnwrapRaw(val));
// Return type: simple
return _retval;
}
int CefTranslatorTestCToCpp::SetChildRawPtrLibrary(
CefRawPtr<CefTranslatorTestScopedLibraryChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_raw_ptr_library))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: rawptr_same
DCHECK(val);
if (!val)
return 0;
// Execute
int _retval = _struct->set_child_raw_ptr_library(_struct,
CefTranslatorTestScopedLibraryChildCToCpp::UnwrapRaw(val));
// Return type: simple
return _retval;
}
bool CefTranslatorTestCToCpp::SetRawPtrLibraryList(
const std::vector<CefRawPtr<CefTranslatorTestScopedLibrary>>& val, int val1,
int val2) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_raw_ptr_library_list))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: val; type: rawptr_vec_same_byref_const
const size_t valCount = val.size();
cef_translator_test_scoped_library_t** valList = NULL;
if (valCount > 0) {
valList = new cef_translator_test_scoped_library_t*[valCount];
DCHECK(valList);
if (valList) {
for (size_t i = 0; i < valCount; ++i) {
valList[i] = CefTranslatorTestScopedLibraryCToCpp::UnwrapRaw(val[i]);
}
}
}
// Execute
int _retval = _struct->set_raw_ptr_library_list(_struct,
valCount,
valList,
val1,
val2);
// Restore param:val; type: rawptr_vec_same_byref_const
if (valList)
delete [] valList;
// Return type: bool
return _retval?true:false;
}
int CefTranslatorTestCToCpp::SetRawPtrClient(
CefRawPtr<CefTranslatorTestScopedClient> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_raw_ptr_client))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: rawptr_diff
DCHECK(val);
if (!val)
return 0;
// Translate param: val; type: rawptr_diff
CefOwnPtr<CefTranslatorTestScopedClientCppToC> valPtr(
CefTranslatorTestScopedClientCppToC::WrapRaw(val));
// Execute
int _retval = _struct->set_raw_ptr_client(_struct,
valPtr->GetStruct());
// Return type: simple
return _retval;
}
int CefTranslatorTestCToCpp::SetChildRawPtrClient(
CefRawPtr<CefTranslatorTestScopedClientChild> val) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_child_raw_ptr_client))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: val; type: rawptr_diff
DCHECK(val);
if (!val)
return 0;
// Translate param: val; type: rawptr_diff
CefOwnPtr<CefTranslatorTestScopedClientChildCppToC> valPtr(
CefTranslatorTestScopedClientChildCppToC::WrapRaw(val));
// Execute
int _retval = _struct->set_child_raw_ptr_client(_struct,
valPtr->GetStruct());
// Return type: simple
return _retval;
}
bool CefTranslatorTestCToCpp::SetRawPtrClientList(
const std::vector<CefRawPtr<CefTranslatorTestScopedClient>>& val, int val1,
int val2) {
cef_translator_test_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_raw_ptr_client_list))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: val; type: rawptr_vec_diff_byref_const
const size_t valCount = val.size();
cef_translator_test_scoped_client_t** valList = NULL;
if (valCount > 0) {
valList = new cef_translator_test_scoped_client_t*[valCount];
DCHECK(valList);
if (valList) {
for (size_t i = 0; i < valCount; ++i) {
valList[i] = CefTranslatorTestScopedClientCppToC::WrapRaw(
val[i]).release()->GetStruct();
}
}
}
// Execute
int _retval = _struct->set_raw_ptr_client_list(_struct,
valCount,
valList,
val1,
val2);
// Restore param:val; type: rawptr_vec_diff_byref_const
if (valCount > 0) {
for (size_t i = 0; i < valCount; ++i) {
delete CefTranslatorTestScopedClientCppToC::GetWrapper(valList[i]);
}
}
if (valList)
delete [] valList;
// Return type: bool
return _retval?true:false;
}
// CONSTRUCTOR - Do not edit by hand.

View File

@@ -64,30 +64,61 @@ class CefTranslatorTestCToCpp
bool SetPointList(const std::vector<CefPoint>& val) OVERRIDE;
bool GetPointListByRef(PointList& val) OVERRIDE;
size_t GetPointListSize() OVERRIDE;
CefRefPtr<CefTranslatorTestObject> GetObject(int val) OVERRIDE;
int SetObject(CefRefPtr<CefTranslatorTestObject> val) OVERRIDE;
CefRefPtr<CefTranslatorTestObject> SetObjectAndReturn(
CefRefPtr<CefTranslatorTestObject> val) OVERRIDE;
int SetChildObject(CefRefPtr<CefTranslatorTestObjectChild> val) OVERRIDE;
CefRefPtr<CefTranslatorTestObject> SetChildObjectAndReturnParent(
CefRefPtr<CefTranslatorTestObjectChild> val) OVERRIDE;
bool SetObjectList(const std::vector<CefRefPtr<CefTranslatorTestObject>>& val,
CefRefPtr<CefTranslatorTestRefPtrLibrary> GetRefPtrLibrary(int val) OVERRIDE;
int SetRefPtrLibrary(CefRefPtr<CefTranslatorTestRefPtrLibrary> val) OVERRIDE;
CefRefPtr<CefTranslatorTestRefPtrLibrary> SetRefPtrLibraryAndReturn(
CefRefPtr<CefTranslatorTestRefPtrLibrary> val) OVERRIDE;
int SetChildRefPtrLibrary(
CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) OVERRIDE;
CefRefPtr<CefTranslatorTestRefPtrLibrary> SetChildRefPtrLibraryAndReturnParent(
CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) OVERRIDE;
bool SetRefPtrLibraryList(
const std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>>& val,
int val1, int val2) OVERRIDE;
bool GetObjectListByRef(ObjectList& val, int val1, int val2) OVERRIDE;
size_t GetObjectListSize() OVERRIDE;
int SetHandler(CefRefPtr<CefTranslatorTestHandler> val) OVERRIDE;
CefRefPtr<CefTranslatorTestHandler> SetHandlerAndReturn(
CefRefPtr<CefTranslatorTestHandler> val) OVERRIDE;
int SetChildHandler(CefRefPtr<CefTranslatorTestHandlerChild> val) OVERRIDE;
CefRefPtr<CefTranslatorTestHandler> SetChildHandlerAndReturnParent(
CefRefPtr<CefTranslatorTestHandlerChild> val) OVERRIDE;
bool SetHandlerList(
const std::vector<CefRefPtr<CefTranslatorTestHandler>>& val, int val1,
bool GetRefPtrLibraryListByRef(RefPtrLibraryList& val, int val1,
int val2) OVERRIDE;
bool GetHandlerListByRef(HandlerList& val,
CefRefPtr<CefTranslatorTestHandler> val1,
CefRefPtr<CefTranslatorTestHandler> val2) OVERRIDE;
size_t GetHandlerListSize() OVERRIDE;
size_t GetRefPtrLibraryListSize() OVERRIDE;
int SetRefPtrClient(CefRefPtr<CefTranslatorTestRefPtrClient> val) OVERRIDE;
CefRefPtr<CefTranslatorTestRefPtrClient> SetRefPtrClientAndReturn(
CefRefPtr<CefTranslatorTestRefPtrClient> val) OVERRIDE;
int SetChildRefPtrClient(
CefRefPtr<CefTranslatorTestRefPtrClientChild> val) OVERRIDE;
CefRefPtr<CefTranslatorTestRefPtrClient> SetChildRefPtrClientAndReturnParent(
CefRefPtr<CefTranslatorTestRefPtrClientChild> val) OVERRIDE;
bool SetRefPtrClientList(
const std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>>& val,
int val1, int val2) OVERRIDE;
bool GetRefPtrClientListByRef(RefPtrClientList& val,
CefRefPtr<CefTranslatorTestRefPtrClient> val1,
CefRefPtr<CefTranslatorTestRefPtrClient> val2) OVERRIDE;
size_t GetRefPtrClientListSize() OVERRIDE;
CefOwnPtr<CefTranslatorTestScopedLibrary> GetOwnPtrLibrary(int val) OVERRIDE;
int SetOwnPtrLibrary(CefOwnPtr<CefTranslatorTestScopedLibrary> val) OVERRIDE;
CefOwnPtr<CefTranslatorTestScopedLibrary> SetOwnPtrLibraryAndReturn(
CefOwnPtr<CefTranslatorTestScopedLibrary> val) OVERRIDE;
int SetChildOwnPtrLibrary(
CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) OVERRIDE;
CefOwnPtr<CefTranslatorTestScopedLibrary> SetChildOwnPtrLibraryAndReturnParent(
CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) OVERRIDE;
int SetOwnPtrClient(CefOwnPtr<CefTranslatorTestScopedClient> val) OVERRIDE;
CefOwnPtr<CefTranslatorTestScopedClient> SetOwnPtrClientAndReturn(
CefOwnPtr<CefTranslatorTestScopedClient> val) OVERRIDE;
int SetChildOwnPtrClient(
CefOwnPtr<CefTranslatorTestScopedClientChild> val) OVERRIDE;
CefOwnPtr<CefTranslatorTestScopedClient> SetChildOwnPtrClientAndReturnParent(
CefOwnPtr<CefTranslatorTestScopedClientChild> val) OVERRIDE;
int SetRawPtrLibrary(CefRawPtr<CefTranslatorTestScopedLibrary> val) OVERRIDE;
int SetChildRawPtrLibrary(
CefRawPtr<CefTranslatorTestScopedLibraryChild> val) OVERRIDE;
bool SetRawPtrLibraryList(
const std::vector<CefRawPtr<CefTranslatorTestScopedLibrary>>& val,
int val1, int val2) OVERRIDE;
int SetRawPtrClient(CefRawPtr<CefTranslatorTestScopedClient> val) OVERRIDE;
int SetChildRawPtrClient(
CefRawPtr<CefTranslatorTestScopedClientChild> val) OVERRIDE;
bool SetRawPtrClientList(
const std::vector<CefRawPtr<CefTranslatorTestScopedClient>>& val,
int val1, int val2) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_CTOCPP_H_

View File

@@ -1,58 +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/ctocpp/test/translator_test_handler_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_handler_child_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestHandlerCToCpp::GetValue() {
cef_translator_test_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestHandlerCToCpp::CefTranslatorTestHandlerCToCpp() {
}
template<> cef_translator_test_handler_t* CefCToCpp<CefTranslatorTestHandlerCToCpp,
CefTranslatorTestHandler, cef_translator_test_handler_t>::UnwrapDerived(
CefWrapperType type, CefTranslatorTestHandler* c) {
if (type == WT_TRANSLATOR_TEST_HANDLER_CHILD) {
return reinterpret_cast<cef_translator_test_handler_t*>(
CefTranslatorTestHandlerChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestHandlerChild*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestHandlerCToCpp,
CefTranslatorTestHandler, cef_translator_test_handler_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestHandlerCToCpp,
CefTranslatorTestHandler, cef_translator_test_handler_t>::kWrapperType =
WT_TRANSLATOR_TEST_HANDLER;

View File

@@ -1,142 +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/ctocpp/test/translator_test_object_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTranslatorTestObjectChildChild> CefTranslatorTestObjectChildChild::Create(
int value, int other_value, int other_other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_object_child_child_t* _retval =
cef_translator_test_object_child_child_create(
value,
other_value,
other_other_value);
// Return type: refptr_same
return CefTranslatorTestObjectChildChildCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestObjectChildChildCToCpp::GetOtherOtherValue() {
cef_translator_test_object_child_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestObjectChildChildCToCpp::SetOtherOtherValue(int value) {
cef_translator_test_object_child_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_other_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_other_value(_struct,
value);
}
int CefTranslatorTestObjectChildChildCToCpp::GetOtherValue() {
cef_translator_test_object_child_t* _struct =
reinterpret_cast<cef_translator_test_object_child_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestObjectChildChildCToCpp::SetOtherValue(int value) {
cef_translator_test_object_child_t* _struct =
reinterpret_cast<cef_translator_test_object_child_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_value(_struct,
value);
}
int CefTranslatorTestObjectChildChildCToCpp::GetValue() {
cef_translator_test_object_t* _struct =
reinterpret_cast<cef_translator_test_object_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestObjectChildChildCToCpp::SetValue(int value) {
cef_translator_test_object_t* _struct =
reinterpret_cast<cef_translator_test_object_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestObjectChildChildCToCpp::CefTranslatorTestObjectChildChildCToCpp(
) {
}
template<> cef_translator_test_object_child_child_t* CefCToCpp<CefTranslatorTestObjectChildChildCToCpp,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t>::UnwrapDerived(
CefWrapperType type, CefTranslatorTestObjectChildChild* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestObjectChildChildCToCpp,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestObjectChildChildCToCpp,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD;

View File

@@ -1,118 +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/ctocpp/test/translator_test_object_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_object_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTranslatorTestObjectChild> CefTranslatorTestObjectChild::Create(
int value, int other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_object_child_t* _retval =
cef_translator_test_object_child_create(
value,
other_value);
// Return type: refptr_same
return CefTranslatorTestObjectChildCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestObjectChildCToCpp::GetOtherValue() {
cef_translator_test_object_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestObjectChildCToCpp::SetOtherValue(int value) {
cef_translator_test_object_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_value(_struct,
value);
}
int CefTranslatorTestObjectChildCToCpp::GetValue() {
cef_translator_test_object_t* _struct =
reinterpret_cast<cef_translator_test_object_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestObjectChildCToCpp::SetValue(int value) {
cef_translator_test_object_t* _struct =
reinterpret_cast<cef_translator_test_object_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestObjectChildCToCpp::CefTranslatorTestObjectChildCToCpp() {
}
template<> cef_translator_test_object_child_t* CefCToCpp<CefTranslatorTestObjectChildCToCpp,
CefTranslatorTestObjectChild,
cef_translator_test_object_child_t>::UnwrapDerived(CefWrapperType type,
CefTranslatorTestObjectChild* c) {
if (type == WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_object_child_t*>(
CefTranslatorTestObjectChildChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestObjectChildChild*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestObjectChildCToCpp,
CefTranslatorTestObjectChild,
cef_translator_test_object_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestObjectChildCToCpp,
CefTranslatorTestObjectChild,
cef_translator_test_object_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_OBJECT_CHILD;

View File

@@ -1,90 +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/ctocpp/test/translator_test_object_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_object_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_object_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTranslatorTestObject> CefTranslatorTestObject::Create(int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_object_t* _retval = cef_translator_test_object_create(
value);
// Return type: refptr_same
return CefTranslatorTestObjectCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestObjectCToCpp::GetValue() {
cef_translator_test_object_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestObjectCToCpp::SetValue(int value) {
cef_translator_test_object_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestObjectCToCpp::CefTranslatorTestObjectCToCpp() {
}
template<> cef_translator_test_object_t* CefCToCpp<CefTranslatorTestObjectCToCpp,
CefTranslatorTestObject, cef_translator_test_object_t>::UnwrapDerived(
CefWrapperType type, CefTranslatorTestObject* c) {
if (type == WT_TRANSLATOR_TEST_OBJECT_CHILD) {
return reinterpret_cast<cef_translator_test_object_t*>(
CefTranslatorTestObjectChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestObjectChild*>(c)));
}
if (type == WT_TRANSLATOR_TEST_OBJECT_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_object_t*>(
CefTranslatorTestObjectChildChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestObjectChildChild*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestObjectCToCpp,
CefTranslatorTestObject, cef_translator_test_object_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestObjectCToCpp,
CefTranslatorTestObject, cef_translator_test_object_t>::kWrapperType =
WT_TRANSLATOR_TEST_OBJECT;

View File

@@ -10,13 +10,13 @@
// for more information.
//
#include "libcef_dll/ctocpp/test/translator_test_handler_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestHandlerChildCToCpp::GetOtherValue() {
cef_translator_test_handler_child_t* _struct = GetStruct();
int CefTranslatorTestRefPtrClientChildCToCpp::GetOtherValue() {
cef_translator_test_ref_ptr_client_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
@@ -29,9 +29,9 @@ int CefTranslatorTestHandlerChildCToCpp::GetOtherValue() {
return _retval;
}
int CefTranslatorTestHandlerChildCToCpp::GetValue() {
cef_translator_test_handler_t* _struct =
reinterpret_cast<cef_translator_test_handler_t*>(GetStruct());
int CefTranslatorTestRefPtrClientChildCToCpp::GetValue() {
cef_translator_test_ref_ptr_client_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_client_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
@@ -47,24 +47,25 @@ int CefTranslatorTestHandlerChildCToCpp::GetValue() {
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestHandlerChildCToCpp::CefTranslatorTestHandlerChildCToCpp() {
CefTranslatorTestRefPtrClientChildCToCpp::CefTranslatorTestRefPtrClientChildCToCpp(
) {
}
template<> cef_translator_test_handler_child_t* CefCToCpp<CefTranslatorTestHandlerChildCToCpp,
CefTranslatorTestHandlerChild,
cef_translator_test_handler_child_t>::UnwrapDerived(CefWrapperType type,
CefTranslatorTestHandlerChild* c) {
template<> cef_translator_test_ref_ptr_client_child_t* CefCToCpp<CefTranslatorTestRefPtrClientChildCToCpp,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::UnwrapDerived(
CefWrapperType type, CefTranslatorTestRefPtrClientChild* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestHandlerChildCToCpp,
CefTranslatorTestHandlerChild,
cef_translator_test_handler_child_t>::DebugObjCt = 0;
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestRefPtrClientChildCToCpp,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestHandlerChildCToCpp,
CefTranslatorTestHandlerChild,
cef_translator_test_handler_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_HANDLER_CHILD;
template<> CefWrapperType CefCToCpp<CefTranslatorTestRefPtrClientChildCToCpp,
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_CTOCPP_TEST_TRANSLATOR_TEST_HANDLER_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_HANDLER_CHILD_CTOCPP_H_
#ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CTOCPP_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
@@ -24,17 +24,18 @@
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestHandlerChildCToCpp
: public CefCToCpp<CefTranslatorTestHandlerChildCToCpp,
CefTranslatorTestHandlerChild, cef_translator_test_handler_child_t> {
class CefTranslatorTestRefPtrClientChildCToCpp
: public CefCToCpp<CefTranslatorTestRefPtrClientChildCToCpp,
CefTranslatorTestRefPtrClientChild,
cef_translator_test_ref_ptr_client_child_t> {
public:
CefTranslatorTestHandlerChildCToCpp();
CefTranslatorTestRefPtrClientChildCToCpp();
// CefTranslatorTestHandlerChild methods.
// CefTranslatorTestRefPtrClientChild methods.
int GetOtherValue() override;
// CefTranslatorTestHandler methods.
// CefTranslatorTestRefPtrClient methods.
int GetValue() override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_HANDLER_CHILD_CTOCPP_H_
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CTOCPP_H_

View File

@@ -0,0 +1,61 @@
// 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/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestRefPtrClientCToCpp::GetValue() {
cef_translator_test_ref_ptr_client_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrClientCToCpp::CefTranslatorTestRefPtrClientCToCpp() {
}
template<> cef_translator_test_ref_ptr_client_t* CefCToCpp<CefTranslatorTestRefPtrClientCToCpp,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::UnwrapDerived(CefWrapperType type,
CefTranslatorTestRefPtrClient* c) {
if (type == WT_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD) {
return reinterpret_cast<cef_translator_test_ref_ptr_client_t*>(
CefTranslatorTestRefPtrClientChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestRefPtrClientChild*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestRefPtrClientCToCpp,
CefTranslatorTestRefPtrClient,
cef_translator_test_ref_ptr_client_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestRefPtrClientCToCpp,
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_CTOCPP_TEST_TRANSLATOR_TEST_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_HANDLER_CTOCPP_H_
#ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CTOCPP_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
@@ -24,14 +24,14 @@
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestHandlerCToCpp
: public CefCToCpp<CefTranslatorTestHandlerCToCpp, CefTranslatorTestHandler,
cef_translator_test_handler_t> {
class CefTranslatorTestRefPtrClientCToCpp
: public CefCToCpp<CefTranslatorTestRefPtrClientCToCpp,
CefTranslatorTestRefPtrClient, cef_translator_test_ref_ptr_client_t> {
public:
CefTranslatorTestHandlerCToCpp();
CefTranslatorTestRefPtrClientCToCpp();
// CefTranslatorTestHandler methods.
// CefTranslatorTestRefPtrClient methods.
int GetValue() override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_HANDLER_CTOCPP_H_
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CTOCPP_H_

View File

@@ -0,0 +1,145 @@
// 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/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild> CefTranslatorTestRefPtrLibraryChildChild::Create(
int value, int other_value, int other_other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_ref_ptr_library_child_child_t* _retval =
cef_translator_test_ref_ptr_library_child_child_create(
value,
other_value,
other_other_value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryChildChildCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestRefPtrLibraryChildChildCToCpp::GetOtherOtherValue() {
cef_translator_test_ref_ptr_library_child_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestRefPtrLibraryChildChildCToCpp::SetOtherOtherValue(
int value) {
cef_translator_test_ref_ptr_library_child_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_other_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_other_value(_struct,
value);
}
int CefTranslatorTestRefPtrLibraryChildChildCToCpp::GetOtherValue() {
cef_translator_test_ref_ptr_library_child_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(GetStruct(
));
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestRefPtrLibraryChildChildCToCpp::SetOtherValue(int value) {
cef_translator_test_ref_ptr_library_child_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(GetStruct(
));
if (CEF_MEMBER_MISSING(_struct, set_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_value(_struct,
value);
}
int CefTranslatorTestRefPtrLibraryChildChildCToCpp::GetValue() {
cef_translator_test_ref_ptr_library_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestRefPtrLibraryChildChildCToCpp::SetValue(int value) {
cef_translator_test_ref_ptr_library_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryChildChildCToCpp::CefTranslatorTestRefPtrLibraryChildChildCToCpp(
) {
}
template<> cef_translator_test_ref_ptr_library_child_child_t* CefCToCpp<CefTranslatorTestRefPtrLibraryChildChildCToCpp,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::UnwrapDerived(
CefWrapperType type, CefTranslatorTestRefPtrLibraryChildChild* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestRefPtrLibraryChildChildCToCpp,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestRefPtrLibraryChildChildCToCpp,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD;

View File

@@ -10,8 +10,8 @@
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CHILD_CTOCPP_H_
#ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CTOCPP_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
@@ -24,24 +24,24 @@
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestObjectChildChildCToCpp
: public CefCToCpp<CefTranslatorTestObjectChildChildCToCpp,
CefTranslatorTestObjectChildChild,
cef_translator_test_object_child_child_t> {
class CefTranslatorTestRefPtrLibraryChildChildCToCpp
: public CefCToCpp<CefTranslatorTestRefPtrLibraryChildChildCToCpp,
CefTranslatorTestRefPtrLibraryChildChild,
cef_translator_test_ref_ptr_library_child_child_t> {
public:
CefTranslatorTestObjectChildChildCToCpp();
CefTranslatorTestRefPtrLibraryChildChildCToCpp();
// CefTranslatorTestObjectChildChild methods.
// CefTranslatorTestRefPtrLibraryChildChild methods.
int GetOtherOtherValue() OVERRIDE;
void SetOtherOtherValue(int value) OVERRIDE;
// CefTranslatorTestObjectChild methods.
// CefTranslatorTestRefPtrLibraryChild methods.
int GetOtherValue() OVERRIDE;
void SetOtherValue(int value) OVERRIDE;
// CefTranslatorTestObject methods.
// CefTranslatorTestRefPtrLibrary methods.
int GetValue() OVERRIDE;
void SetValue(int value) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CHILD_CTOCPP_H_
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CTOCPP_H_

View File

@@ -0,0 +1,119 @@
// 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/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTranslatorTestRefPtrLibraryChild> CefTranslatorTestRefPtrLibraryChild::Create(
int value, int other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_ref_ptr_library_child_t* _retval =
cef_translator_test_ref_ptr_library_child_create(
value,
other_value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryChildCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestRefPtrLibraryChildCToCpp::GetOtherValue() {
cef_translator_test_ref_ptr_library_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestRefPtrLibraryChildCToCpp::SetOtherValue(int value) {
cef_translator_test_ref_ptr_library_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_value(_struct,
value);
}
int CefTranslatorTestRefPtrLibraryChildCToCpp::GetValue() {
cef_translator_test_ref_ptr_library_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestRefPtrLibraryChildCToCpp::SetValue(int value) {
cef_translator_test_ref_ptr_library_t* _struct =
reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryChildCToCpp::CefTranslatorTestRefPtrLibraryChildCToCpp(
) {
}
template<> cef_translator_test_ref_ptr_library_child_t* CefCToCpp<CefTranslatorTestRefPtrLibraryChildCToCpp,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::UnwrapDerived(
CefWrapperType type, CefTranslatorTestRefPtrLibraryChild* c) {
if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(
CefTranslatorTestRefPtrLibraryChildChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestRefPtrLibraryChildChild*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestRefPtrLibraryChildCToCpp,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestRefPtrLibraryChildCToCpp,
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_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CTOCPP_H_
#ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CTOCPP_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
@@ -24,19 +24,20 @@
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestObjectChildCToCpp
: public CefCToCpp<CefTranslatorTestObjectChildCToCpp,
CefTranslatorTestObjectChild, cef_translator_test_object_child_t> {
class CefTranslatorTestRefPtrLibraryChildCToCpp
: public CefCToCpp<CefTranslatorTestRefPtrLibraryChildCToCpp,
CefTranslatorTestRefPtrLibraryChild,
cef_translator_test_ref_ptr_library_child_t> {
public:
CefTranslatorTestObjectChildCToCpp();
CefTranslatorTestRefPtrLibraryChildCToCpp();
// CefTranslatorTestObjectChild methods.
// CefTranslatorTestRefPtrLibraryChild methods.
int GetOtherValue() OVERRIDE;
void SetOtherValue(int value) OVERRIDE;
// CefTranslatorTestObject methods.
// CefTranslatorTestRefPtrLibrary methods.
int GetValue() OVERRIDE;
void SetValue(int value) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CHILD_CTOCPP_H_
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CTOCPP_H_

View File

@@ -0,0 +1,95 @@
// 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/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestRefPtrLibrary::Create(
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_ref_ptr_library_t* _retval =
cef_translator_test_ref_ptr_library_create(
value);
// Return type: refptr_same
return CefTranslatorTestRefPtrLibraryCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestRefPtrLibraryCToCpp::GetValue() {
cef_translator_test_ref_ptr_library_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestRefPtrLibraryCToCpp::SetValue(int value) {
cef_translator_test_ref_ptr_library_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestRefPtrLibraryCToCpp::CefTranslatorTestRefPtrLibraryCToCpp() {
}
template<> cef_translator_test_ref_ptr_library_t* CefCToCpp<CefTranslatorTestRefPtrLibraryCToCpp,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::UnwrapDerived(CefWrapperType type,
CefTranslatorTestRefPtrLibrary* c) {
if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD) {
return reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(
CefTranslatorTestRefPtrLibraryChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestRefPtrLibraryChild*>(c)));
}
if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(
CefTranslatorTestRefPtrLibraryChildChildCToCpp::Unwrap(
reinterpret_cast<CefTranslatorTestRefPtrLibraryChildChild*>(c)));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCpp<CefTranslatorTestRefPtrLibraryCToCpp,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefTranslatorTestRefPtrLibraryCToCpp,
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_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CTOCPP_H_
#ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CTOCPP_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
@@ -24,15 +24,16 @@
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestObjectCToCpp
: public CefCToCpp<CefTranslatorTestObjectCToCpp, CefTranslatorTestObject,
cef_translator_test_object_t> {
class CefTranslatorTestRefPtrLibraryCToCpp
: public CefCToCpp<CefTranslatorTestRefPtrLibraryCToCpp,
CefTranslatorTestRefPtrLibrary,
cef_translator_test_ref_ptr_library_t> {
public:
CefTranslatorTestObjectCToCpp();
CefTranslatorTestRefPtrLibraryCToCpp();
// CefTranslatorTestObject methods.
// CefTranslatorTestRefPtrLibrary methods.
int GetValue() OVERRIDE;
void SetValue(int value) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_OBJECT_CTOCPP_H_
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CTOCPP_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/ctocpp/test/translator_test_scoped_client_child_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestScopedClientChildCToCpp::GetOtherValue() {
cef_translator_test_scoped_client_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
int CefTranslatorTestScopedClientChildCToCpp::GetValue() {
cef_translator_test_scoped_client_t* _struct =
reinterpret_cast<cef_translator_test_scoped_client_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedClientChildCToCpp::CefTranslatorTestScopedClientChildCToCpp(
) {
}
template<> cef_translator_test_scoped_client_child_t* CefCToCppScoped<CefTranslatorTestScopedClientChildCToCpp,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::UnwrapDerivedOwn(
CefWrapperType type, CefOwnPtr<CefTranslatorTestScopedClientChild> c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template<> cef_translator_test_scoped_client_child_t* CefCToCppScoped<CefTranslatorTestScopedClientChildCToCpp,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::UnwrapDerivedRaw(
CefWrapperType type, CefRawPtr<CefTranslatorTestScopedClientChild> c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppScoped<CefTranslatorTestScopedClientChildCToCpp,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppScoped<CefTranslatorTestScopedClientChildCToCpp,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD;

View File

@@ -0,0 +1,41 @@
// 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_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CTOCPP_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/ctocpp/ctocpp_scoped.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestScopedClientChildCToCpp
: public CefCToCppScoped<CefTranslatorTestScopedClientChildCToCpp,
CefTranslatorTestScopedClientChild,
cef_translator_test_scoped_client_child_t> {
public:
CefTranslatorTestScopedClientChildCToCpp();
// CefTranslatorTestScopedClientChild methods.
int GetOtherValue() override;
// CefTranslatorTestScopedClient methods.
int GetValue() override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CTOCPP_H_

View File

@@ -0,0 +1,76 @@
// 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/ctocpp/test/translator_test_scoped_client_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestScopedClientCToCpp::GetValue() {
cef_translator_test_scoped_client_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedClientCToCpp::CefTranslatorTestScopedClientCToCpp() {
}
template<> cef_translator_test_scoped_client_t* CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::UnwrapDerivedOwn(CefWrapperType type,
CefOwnPtr<CefTranslatorTestScopedClient> c) {
if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_client_t*>(
CefTranslatorTestScopedClientChildCToCpp::UnwrapOwn(
CefOwnPtr<CefTranslatorTestScopedClientChild>(
reinterpret_cast<CefTranslatorTestScopedClientChild*>(c.release()))));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template<> cef_translator_test_scoped_client_t* CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::UnwrapDerivedRaw(CefWrapperType type,
CefRawPtr<CefTranslatorTestScopedClient> c) {
if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_client_t*>(
CefTranslatorTestScopedClientChildCToCpp::UnwrapRaw(
CefRawPtr<CefTranslatorTestScopedClientChild>(
reinterpret_cast<CefTranslatorTestScopedClientChild*>(c))));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
CefTranslatorTestScopedClient,
cef_translator_test_scoped_client_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_CLIENT;

View File

@@ -0,0 +1,37 @@
// 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_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CTOCPP_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/ctocpp/ctocpp_scoped.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefTranslatorTestScopedClientCToCpp
: public CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
CefTranslatorTestScopedClient, cef_translator_test_scoped_client_t> {
public:
CefTranslatorTestScopedClientCToCpp();
// CefTranslatorTestScopedClient methods.
int GetValue() override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CTOCPP_H_

View File

@@ -0,0 +1,155 @@
// 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/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> CefTranslatorTestScopedLibraryChildChild::Create(
int value, int other_value, int other_other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_scoped_library_child_child_t* _retval =
cef_translator_test_scoped_library_child_child_create(
value,
other_value,
other_other_value);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryChildChildCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestScopedLibraryChildChildCToCpp::GetOtherOtherValue() {
cef_translator_test_scoped_library_child_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestScopedLibraryChildChildCToCpp::SetOtherOtherValue(
int value) {
cef_translator_test_scoped_library_child_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_other_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_other_value(_struct,
value);
}
int CefTranslatorTestScopedLibraryChildChildCToCpp::GetOtherValue() {
cef_translator_test_scoped_library_child_t* _struct =
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(GetStruct(
));
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestScopedLibraryChildChildCToCpp::SetOtherValue(int value) {
cef_translator_test_scoped_library_child_t* _struct =
reinterpret_cast<cef_translator_test_scoped_library_child_t*>(GetStruct(
));
if (CEF_MEMBER_MISSING(_struct, set_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_value(_struct,
value);
}
int CefTranslatorTestScopedLibraryChildChildCToCpp::GetValue() {
cef_translator_test_scoped_library_t* _struct =
reinterpret_cast<cef_translator_test_scoped_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestScopedLibraryChildChildCToCpp::SetValue(int value) {
cef_translator_test_scoped_library_t* _struct =
reinterpret_cast<cef_translator_test_scoped_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryChildChildCToCpp::CefTranslatorTestScopedLibraryChildChildCToCpp(
) {
}
template<> cef_translator_test_scoped_library_child_child_t* CefCToCppScoped<CefTranslatorTestScopedLibraryChildChildCToCpp,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::UnwrapDerivedOwn(
CefWrapperType type,
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template<> cef_translator_test_scoped_library_child_child_t* CefCToCppScoped<CefTranslatorTestScopedLibraryChildChildCToCpp,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::UnwrapDerivedRaw(
CefWrapperType type,
CefRawPtr<CefTranslatorTestScopedLibraryChildChild> c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppScoped<CefTranslatorTestScopedLibraryChildChildCToCpp,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppScoped<CefTranslatorTestScopedLibraryChildChildCToCpp,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD;

View File

@@ -0,0 +1,47 @@
// 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_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CTOCPP_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/ctocpp/ctocpp_scoped.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestScopedLibraryChildChildCToCpp
: public CefCToCppScoped<CefTranslatorTestScopedLibraryChildChildCToCpp,
CefTranslatorTestScopedLibraryChildChild,
cef_translator_test_scoped_library_child_child_t> {
public:
CefTranslatorTestScopedLibraryChildChildCToCpp();
// CefTranslatorTestScopedLibraryChildChild methods.
int GetOtherOtherValue() OVERRIDE;
void SetOtherOtherValue(int value) OVERRIDE;
// CefTranslatorTestScopedLibraryChild methods.
int GetOtherValue() OVERRIDE;
void SetOtherValue(int value) OVERRIDE;
// CefTranslatorTestScopedLibrary methods.
int GetValue() OVERRIDE;
void SetValue(int value) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CTOCPP_H_

View File

@@ -0,0 +1,135 @@
// 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/ctocpp/test/translator_test_scoped_library_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefOwnPtr<CefTranslatorTestScopedLibraryChild> CefTranslatorTestScopedLibraryChild::Create(
int value, int other_value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_scoped_library_child_t* _retval =
cef_translator_test_scoped_library_child_create(
value,
other_value);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryChildCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestScopedLibraryChildCToCpp::GetOtherValue() {
cef_translator_test_scoped_library_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_other_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_other_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestScopedLibraryChildCToCpp::SetOtherValue(int value) {
cef_translator_test_scoped_library_child_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_other_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_other_value(_struct,
value);
}
int CefTranslatorTestScopedLibraryChildCToCpp::GetValue() {
cef_translator_test_scoped_library_t* _struct =
reinterpret_cast<cef_translator_test_scoped_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestScopedLibraryChildCToCpp::SetValue(int value) {
cef_translator_test_scoped_library_t* _struct =
reinterpret_cast<cef_translator_test_scoped_library_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryChildCToCpp::CefTranslatorTestScopedLibraryChildCToCpp(
) {
}
template<> cef_translator_test_scoped_library_child_t* CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::UnwrapDerivedOwn(
CefWrapperType type, CefOwnPtr<CefTranslatorTestScopedLibraryChild> c) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
CefTranslatorTestScopedLibraryChildChildCToCpp::UnwrapOwn(
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>(
reinterpret_cast<CefTranslatorTestScopedLibraryChildChild*>(c.release(
)))));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template<> cef_translator_test_scoped_library_child_t* CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::UnwrapDerivedRaw(
CefWrapperType type, CefRawPtr<CefTranslatorTestScopedLibraryChild> c) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
CefTranslatorTestScopedLibraryChildChildCToCpp::UnwrapRaw(
CefRawPtr<CefTranslatorTestScopedLibraryChildChild>(
reinterpret_cast<CefTranslatorTestScopedLibraryChildChild*>(c))));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD;

View File

@@ -0,0 +1,43 @@
// 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_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CTOCPP_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/ctocpp/ctocpp_scoped.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestScopedLibraryChildCToCpp
: public CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
CefTranslatorTestScopedLibraryChild,
cef_translator_test_scoped_library_child_t> {
public:
CefTranslatorTestScopedLibraryChildCToCpp();
// CefTranslatorTestScopedLibraryChild methods.
int GetOtherValue() OVERRIDE;
void SetOtherValue(int value) OVERRIDE;
// CefTranslatorTestScopedLibrary methods.
int GetValue() OVERRIDE;
void SetValue(int value) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CTOCPP_H_

View File

@@ -0,0 +1,118 @@
// 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/ctocpp/test/translator_test_scoped_library_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h"
// STATIC METHODS - Body may be edited by hand.
CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestScopedLibrary::Create(
int value) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_translator_test_scoped_library_t* _retval =
cef_translator_test_scoped_library_create(
value);
// Return type: ownptr_same
return CefTranslatorTestScopedLibraryCToCpp::Wrap(_retval);
}
// VIRTUAL METHODS - Body may be edited by hand.
int CefTranslatorTestScopedLibraryCToCpp::GetValue() {
cef_translator_test_scoped_library_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_value))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->get_value(_struct);
// Return type: simple
return _retval;
}
void CefTranslatorTestScopedLibraryCToCpp::SetValue(int value) {
cef_translator_test_scoped_library_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_value))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_value(_struct,
value);
}
// CONSTRUCTOR - Do not edit by hand.
CefTranslatorTestScopedLibraryCToCpp::CefTranslatorTestScopedLibraryCToCpp() {
}
template<> cef_translator_test_scoped_library_t* CefCToCppScoped<CefTranslatorTestScopedLibraryCToCpp,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::UnwrapDerivedOwn(
CefWrapperType type, CefOwnPtr<CefTranslatorTestScopedLibrary> c) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_library_t*>(
CefTranslatorTestScopedLibraryChildCToCpp::UnwrapOwn(
CefOwnPtr<CefTranslatorTestScopedLibraryChild>(
reinterpret_cast<CefTranslatorTestScopedLibraryChild*>(c.release()))));
}
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_library_t*>(
CefTranslatorTestScopedLibraryChildChildCToCpp::UnwrapOwn(
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>(
reinterpret_cast<CefTranslatorTestScopedLibraryChildChild*>(c.release(
)))));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template<> cef_translator_test_scoped_library_t* CefCToCppScoped<CefTranslatorTestScopedLibraryCToCpp,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::UnwrapDerivedRaw(
CefWrapperType type, CefRawPtr<CefTranslatorTestScopedLibrary> c) {
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_library_t*>(
CefTranslatorTestScopedLibraryChildCToCpp::UnwrapRaw(
CefRawPtr<CefTranslatorTestScopedLibraryChild>(
reinterpret_cast<CefTranslatorTestScopedLibraryChild*>(c))));
}
if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
return reinterpret_cast<cef_translator_test_scoped_library_t*>(
CefTranslatorTestScopedLibraryChildChildCToCpp::UnwrapRaw(
CefRawPtr<CefTranslatorTestScopedLibraryChildChild>(
reinterpret_cast<CefTranslatorTestScopedLibraryChildChild*>(c))));
}
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCToCppScoped<CefTranslatorTestScopedLibraryCToCpp,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCppScoped<CefTranslatorTestScopedLibraryCToCpp,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t>::kWrapperType =
WT_TRANSLATOR_TEST_SCOPED_LIBRARY;

View File

@@ -0,0 +1,39 @@
// 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_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CTOCPP_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/ctocpp/ctocpp_scoped.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefTranslatorTestScopedLibraryCToCpp
: public CefCToCppScoped<CefTranslatorTestScopedLibraryCToCpp,
CefTranslatorTestScopedLibrary,
cef_translator_test_scoped_library_t> {
public:
CefTranslatorTestScopedLibraryCToCpp();
// CefTranslatorTestScopedLibrary methods.
int GetValue() OVERRIDE;
void SetValue(int value) OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CTOCPP_H_