• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=cf0153094b5c99af0d2ff0f278da810e13a6d889$
13 //
14 
15 #include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h"
16 #include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h"
17 
18 // STATIC METHODS - Body may be edited by hand.
19 
20 NO_SANITIZE("cfi-icall")
21 CefOwnPtr<CefTranslatorTestScopedLibraryChild>
Create(int value,int other_value)22 CefTranslatorTestScopedLibraryChild::Create(int value, int other_value) {
23   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
24 
25   // Execute
26   cef_translator_test_scoped_library_child_t* _retval =
27       cef_translator_test_scoped_library_child_create(value, other_value);
28 
29   // Return type: ownptr_same
30   return CefTranslatorTestScopedLibraryChildCToCpp::Wrap(_retval);
31 }
32 
33 // VIRTUAL METHODS - Body may be edited by hand.
34 
35 NO_SANITIZE("cfi-icall")
GetOtherValue()36 int CefTranslatorTestScopedLibraryChildCToCpp::GetOtherValue() {
37   cef_translator_test_scoped_library_child_t* _struct = GetStruct();
38   if (CEF_MEMBER_MISSING(_struct, get_other_value))
39     return 0;
40 
41   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
42 
43   // Execute
44   int _retval = _struct->get_other_value(_struct);
45 
46   // Return type: simple
47   return _retval;
48 }
49 
50 NO_SANITIZE("cfi-icall")
SetOtherValue(int value)51 void CefTranslatorTestScopedLibraryChildCToCpp::SetOtherValue(int value) {
52   cef_translator_test_scoped_library_child_t* _struct = GetStruct();
53   if (CEF_MEMBER_MISSING(_struct, set_other_value))
54     return;
55 
56   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
57 
58   // Execute
59   _struct->set_other_value(_struct, value);
60 }
61 
62 NO_SANITIZE("cfi-icall")
GetValue()63 int CefTranslatorTestScopedLibraryChildCToCpp::GetValue() {
64   cef_translator_test_scoped_library_t* _struct =
65       reinterpret_cast<cef_translator_test_scoped_library_t*>(GetStruct());
66   if (CEF_MEMBER_MISSING(_struct, get_value))
67     return 0;
68 
69   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
70 
71   // Execute
72   int _retval = _struct->get_value(_struct);
73 
74   // Return type: simple
75   return _retval;
76 }
77 
78 NO_SANITIZE("cfi-icall")
SetValue(int value)79 void CefTranslatorTestScopedLibraryChildCToCpp::SetValue(int value) {
80   cef_translator_test_scoped_library_t* _struct =
81       reinterpret_cast<cef_translator_test_scoped_library_t*>(GetStruct());
82   if (CEF_MEMBER_MISSING(_struct, set_value))
83     return;
84 
85   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
86 
87   // Execute
88   _struct->set_value(_struct, value);
89 }
90 
91 // CONSTRUCTOR - Do not edit by hand.
92 
93 CefTranslatorTestScopedLibraryChildCToCpp::
CefTranslatorTestScopedLibraryChildCToCpp()94     CefTranslatorTestScopedLibraryChildCToCpp() {}
95 
96 // DESTRUCTOR - Do not edit by hand.
97 
98 CefTranslatorTestScopedLibraryChildCToCpp::
~CefTranslatorTestScopedLibraryChildCToCpp()99     ~CefTranslatorTestScopedLibraryChildCToCpp() {}
100 
101 template <>
102 cef_translator_test_scoped_library_child_t*
103 CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
104                 CefTranslatorTestScopedLibraryChild,
105                 cef_translator_test_scoped_library_child_t>::
UnwrapDerivedOwn(CefWrapperType type,CefOwnPtr<CefTranslatorTestScopedLibraryChild> c)106     UnwrapDerivedOwn(CefWrapperType type,
107                      CefOwnPtr<CefTranslatorTestScopedLibraryChild> c) {
108   if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
109     return reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
110         CefTranslatorTestScopedLibraryChildChildCToCpp::UnwrapOwn(
111             CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>(
112                 reinterpret_cast<CefTranslatorTestScopedLibraryChildChild*>(
113                     c.release()))));
114   }
115   NOTREACHED() << "Unexpected class type: " << type;
116   return nullptr;
117 }
118 
119 template <>
120 cef_translator_test_scoped_library_child_t*
121 CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
122                 CefTranslatorTestScopedLibraryChild,
123                 cef_translator_test_scoped_library_child_t>::
UnwrapDerivedRaw(CefWrapperType type,CefRawPtr<CefTranslatorTestScopedLibraryChild> c)124     UnwrapDerivedRaw(CefWrapperType type,
125                      CefRawPtr<CefTranslatorTestScopedLibraryChild> c) {
126   if (type == WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
127     return reinterpret_cast<cef_translator_test_scoped_library_child_t*>(
128         CefTranslatorTestScopedLibraryChildChildCToCpp::UnwrapRaw(
129             CefRawPtr<CefTranslatorTestScopedLibraryChildChild>(
130                 reinterpret_cast<CefTranslatorTestScopedLibraryChildChild*>(
131                     c))));
132   }
133   NOTREACHED() << "Unexpected class type: " << type;
134   return nullptr;
135 }
136 
137 template <>
138 CefWrapperType
139     CefCToCppScoped<CefTranslatorTestScopedLibraryChildCToCpp,
140                     CefTranslatorTestScopedLibraryChild,
141                     cef_translator_test_scoped_library_child_t>::kWrapperType =
142         WT_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD;
143