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=428d7bab8b87fe39bf70e53c8bf1d0a50bf88c33$
13 //
14
15 #include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h"
16
17 // GLOBAL FUNCTIONS - Body may be edited by hand.
18
19 CEF_EXPORT cef_translator_test_scoped_library_child_child_t*
cef_translator_test_scoped_library_child_child_create(int value,int other_value,int other_other_value)20 cef_translator_test_scoped_library_child_child_create(int value,
21 int other_value,
22 int other_other_value) {
23 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
24
25 // Execute
26 CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> _retval =
27 CefTranslatorTestScopedLibraryChildChild::Create(value, other_value,
28 other_other_value);
29
30 // Return type: ownptr_same
31 return CefTranslatorTestScopedLibraryChildChildCppToC::WrapOwn(
32 std::move(_retval));
33 }
34
35 namespace {
36
37 // MEMBER FUNCTIONS - Body may be edited by hand.
38
39 int CEF_CALLBACK
translator_test_scoped_library_child_child_get_other_other_value(struct _cef_translator_test_scoped_library_child_child_t * self)40 translator_test_scoped_library_child_child_get_other_other_value(
41 struct _cef_translator_test_scoped_library_child_child_t* self) {
42 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
43
44 DCHECK(self);
45 if (!self)
46 return 0;
47
48 // Execute
49 int _retval = CefTranslatorTestScopedLibraryChildChildCppToC::Get(self)
50 ->GetOtherOtherValue();
51
52 // Return type: simple
53 return _retval;
54 }
55
56 void CEF_CALLBACK
translator_test_scoped_library_child_child_set_other_other_value(struct _cef_translator_test_scoped_library_child_child_t * self,int value)57 translator_test_scoped_library_child_child_set_other_other_value(
58 struct _cef_translator_test_scoped_library_child_child_t* self,
59 int value) {
60 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
61
62 DCHECK(self);
63 if (!self)
64 return;
65
66 // Execute
67 CefTranslatorTestScopedLibraryChildChildCppToC::Get(self)->SetOtherOtherValue(
68 value);
69 }
70
translator_test_scoped_library_child_child_get_other_value(struct _cef_translator_test_scoped_library_child_t * self)71 int CEF_CALLBACK translator_test_scoped_library_child_child_get_other_value(
72 struct _cef_translator_test_scoped_library_child_t* self) {
73 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
74
75 DCHECK(self);
76 if (!self)
77 return 0;
78
79 // Execute
80 int _retval =
81 CefTranslatorTestScopedLibraryChildChildCppToC::Get(
82 reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
83 self))
84 ->GetOtherValue();
85
86 // Return type: simple
87 return _retval;
88 }
89
translator_test_scoped_library_child_child_set_other_value(struct _cef_translator_test_scoped_library_child_t * self,int value)90 void CEF_CALLBACK translator_test_scoped_library_child_child_set_other_value(
91 struct _cef_translator_test_scoped_library_child_t* self,
92 int value) {
93 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
94
95 DCHECK(self);
96 if (!self)
97 return;
98
99 // Execute
100 CefTranslatorTestScopedLibraryChildChildCppToC::Get(
101 reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(self))
102 ->SetOtherValue(value);
103 }
104
translator_test_scoped_library_child_child_get_value(struct _cef_translator_test_scoped_library_t * self)105 int CEF_CALLBACK translator_test_scoped_library_child_child_get_value(
106 struct _cef_translator_test_scoped_library_t* self) {
107 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
108
109 DCHECK(self);
110 if (!self)
111 return 0;
112
113 // Execute
114 int _retval =
115 CefTranslatorTestScopedLibraryChildChildCppToC::Get(
116 reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(
117 self))
118 ->GetValue();
119
120 // Return type: simple
121 return _retval;
122 }
123
translator_test_scoped_library_child_child_set_value(struct _cef_translator_test_scoped_library_t * self,int value)124 void CEF_CALLBACK translator_test_scoped_library_child_child_set_value(
125 struct _cef_translator_test_scoped_library_t* self,
126 int value) {
127 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
128
129 DCHECK(self);
130 if (!self)
131 return;
132
133 // Execute
134 CefTranslatorTestScopedLibraryChildChildCppToC::Get(
135 reinterpret_cast<cef_translator_test_scoped_library_child_child_t*>(self))
136 ->SetValue(value);
137 }
138
139 } // namespace
140
141 // CONSTRUCTOR - Do not edit by hand.
142
143 CefTranslatorTestScopedLibraryChildChildCppToC::
CefTranslatorTestScopedLibraryChildChildCppToC()144 CefTranslatorTestScopedLibraryChildChildCppToC() {
145 GetStruct()->get_other_other_value =
146 translator_test_scoped_library_child_child_get_other_other_value;
147 GetStruct()->set_other_other_value =
148 translator_test_scoped_library_child_child_set_other_other_value;
149 GetStruct()->base.get_other_value =
150 translator_test_scoped_library_child_child_get_other_value;
151 GetStruct()->base.set_other_value =
152 translator_test_scoped_library_child_child_set_other_value;
153 GetStruct()->base.base.get_value =
154 translator_test_scoped_library_child_child_get_value;
155 GetStruct()->base.base.set_value =
156 translator_test_scoped_library_child_child_set_value;
157 }
158
159 // DESTRUCTOR - Do not edit by hand.
160
161 CefTranslatorTestScopedLibraryChildChildCppToC::
~CefTranslatorTestScopedLibraryChildChildCppToC()162 ~CefTranslatorTestScopedLibraryChildChildCppToC() {}
163
164 template <>
165 CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>
166 CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
167 CefTranslatorTestScopedLibraryChildChild,
168 cef_translator_test_scoped_library_child_child_t>::
UnwrapDerivedOwn(CefWrapperType type,cef_translator_test_scoped_library_child_child_t * s)169 UnwrapDerivedOwn(CefWrapperType type,
170 cef_translator_test_scoped_library_child_child_t* s) {
171 NOTREACHED() << "Unexpected class type: " << type;
172 return CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>();
173 }
174
175 template <>
176 CefRawPtr<CefTranslatorTestScopedLibraryChildChild>
177 CefCppToCScoped<CefTranslatorTestScopedLibraryChildChildCppToC,
178 CefTranslatorTestScopedLibraryChildChild,
179 cef_translator_test_scoped_library_child_child_t>::
UnwrapDerivedRaw(CefWrapperType type,cef_translator_test_scoped_library_child_child_t * s)180 UnwrapDerivedRaw(CefWrapperType type,
181 cef_translator_test_scoped_library_child_child_t* s) {
182 NOTREACHED() << "Unexpected class type: " << type;
183 return nullptr;
184 }
185
186 template <>
187 CefWrapperType CefCppToCScoped<
188 CefTranslatorTestScopedLibraryChildChildCppToC,
189 CefTranslatorTestScopedLibraryChildChild,
190 cef_translator_test_scoped_library_child_child_t>::kWrapperType =
191 WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD;
192