1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 //
5 // ---------------------------------------------------------------------------
6 //
7 // This file was generated by the CEF translator tool. If making changes by
8 // hand only do so within the body of existing method and function
9 // implementations. See the translator.README.txt file in the tools directory
10 // for more information.
11 //
12 // $hash=8559b9fd1e73bb91333d687174f5730e67f1f0f2$
13 //
14
15 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h"
16 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h"
17 #include "libcef_dll/shutdown_checker.h"
18
19 // STATIC METHODS - Body may be edited by hand.
20
21 NO_SANITIZE("cfi-icall")
22 CefRefPtr<CefTranslatorTestRefPtrLibraryChild>
Create(int value,int other_value)23 CefTranslatorTestRefPtrLibraryChild::Create(int value, int other_value) {
24 shutdown_checker::AssertNotShutdown();
25
26 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
27
28 // Execute
29 cef_translator_test_ref_ptr_library_child_t* _retval =
30 cef_translator_test_ref_ptr_library_child_create(value, other_value);
31
32 // Return type: refptr_same
33 return CefTranslatorTestRefPtrLibraryChildCToCpp::Wrap(_retval);
34 }
35
36 // VIRTUAL METHODS - Body may be edited by hand.
37
38 NO_SANITIZE("cfi-icall")
GetOtherValue()39 int CefTranslatorTestRefPtrLibraryChildCToCpp::GetOtherValue() {
40 shutdown_checker::AssertNotShutdown();
41
42 cef_translator_test_ref_ptr_library_child_t* _struct = GetStruct();
43 if (CEF_MEMBER_MISSING(_struct, get_other_value))
44 return 0;
45
46 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
47
48 // Execute
49 int _retval = _struct->get_other_value(_struct);
50
51 // Return type: simple
52 return _retval;
53 }
54
55 NO_SANITIZE("cfi-icall")
SetOtherValue(int value)56 void CefTranslatorTestRefPtrLibraryChildCToCpp::SetOtherValue(int value) {
57 shutdown_checker::AssertNotShutdown();
58
59 cef_translator_test_ref_ptr_library_child_t* _struct = GetStruct();
60 if (CEF_MEMBER_MISSING(_struct, set_other_value))
61 return;
62
63 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
64
65 // Execute
66 _struct->set_other_value(_struct, value);
67 }
68
69 NO_SANITIZE("cfi-icall")
GetValue()70 int CefTranslatorTestRefPtrLibraryChildCToCpp::GetValue() {
71 shutdown_checker::AssertNotShutdown();
72
73 cef_translator_test_ref_ptr_library_t* _struct =
74 reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(GetStruct());
75 if (CEF_MEMBER_MISSING(_struct, get_value))
76 return 0;
77
78 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
79
80 // Execute
81 int _retval = _struct->get_value(_struct);
82
83 // Return type: simple
84 return _retval;
85 }
86
87 NO_SANITIZE("cfi-icall")
SetValue(int value)88 void CefTranslatorTestRefPtrLibraryChildCToCpp::SetValue(int value) {
89 shutdown_checker::AssertNotShutdown();
90
91 cef_translator_test_ref_ptr_library_t* _struct =
92 reinterpret_cast<cef_translator_test_ref_ptr_library_t*>(GetStruct());
93 if (CEF_MEMBER_MISSING(_struct, set_value))
94 return;
95
96 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
97
98 // Execute
99 _struct->set_value(_struct, value);
100 }
101
102 // CONSTRUCTOR - Do not edit by hand.
103
104 CefTranslatorTestRefPtrLibraryChildCToCpp::
CefTranslatorTestRefPtrLibraryChildCToCpp()105 CefTranslatorTestRefPtrLibraryChildCToCpp() {}
106
107 // DESTRUCTOR - Do not edit by hand.
108
109 CefTranslatorTestRefPtrLibraryChildCToCpp::
~CefTranslatorTestRefPtrLibraryChildCToCpp()110 ~CefTranslatorTestRefPtrLibraryChildCToCpp() {
111 shutdown_checker::AssertNotShutdown();
112 }
113
114 template <>
115 cef_translator_test_ref_ptr_library_child_t*
116 CefCToCppRefCounted<CefTranslatorTestRefPtrLibraryChildCToCpp,
117 CefTranslatorTestRefPtrLibraryChild,
118 cef_translator_test_ref_ptr_library_child_t>::
UnwrapDerived(CefWrapperType type,CefTranslatorTestRefPtrLibraryChild * c)119 UnwrapDerived(CefWrapperType type, CefTranslatorTestRefPtrLibraryChild* c) {
120 if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD) {
121 return reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(
122 CefTranslatorTestRefPtrLibraryChildChildCToCpp::Unwrap(
123 reinterpret_cast<CefTranslatorTestRefPtrLibraryChildChild*>(c)));
124 }
125 NOTREACHED() << "Unexpected class type: " << type;
126 return nullptr;
127 }
128
129 template <>
130 CefWrapperType CefCToCppRefCounted<
131 CefTranslatorTestRefPtrLibraryChildCToCpp,
132 CefTranslatorTestRefPtrLibraryChild,
133 cef_translator_test_ref_ptr_library_child_t>::kWrapperType =
134 WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD;
135