• 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=8331f68f4339fbe375428550af8c793d455ef432$
13 //
14 
15 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h"
16 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 // GLOBAL FUNCTIONS - Body may be edited by hand.
20 
21 CEF_EXPORT cef_translator_test_ref_ptr_library_child_t*
cef_translator_test_ref_ptr_library_child_create(int value,int other_value)22 cef_translator_test_ref_ptr_library_child_create(int value, int other_value) {
23   shutdown_checker::AssertNotShutdown();
24 
25   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26 
27   // Execute
28   CefRefPtr<CefTranslatorTestRefPtrLibraryChild> _retval =
29       CefTranslatorTestRefPtrLibraryChild::Create(value, other_value);
30 
31   // Return type: refptr_same
32   return CefTranslatorTestRefPtrLibraryChildCppToC::Wrap(_retval);
33 }
34 
35 namespace {
36 
37 // MEMBER FUNCTIONS - Body may be edited by hand.
38 
translator_test_ref_ptr_library_child_get_other_value(struct _cef_translator_test_ref_ptr_library_child_t * self)39 int CEF_CALLBACK translator_test_ref_ptr_library_child_get_other_value(
40     struct _cef_translator_test_ref_ptr_library_child_t* self) {
41   shutdown_checker::AssertNotShutdown();
42 
43   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
44 
45   DCHECK(self);
46   if (!self)
47     return 0;
48 
49   // Execute
50   int _retval =
51       CefTranslatorTestRefPtrLibraryChildCppToC::Get(self)->GetOtherValue();
52 
53   // Return type: simple
54   return _retval;
55 }
56 
translator_test_ref_ptr_library_child_set_other_value(struct _cef_translator_test_ref_ptr_library_child_t * self,int value)57 void CEF_CALLBACK translator_test_ref_ptr_library_child_set_other_value(
58     struct _cef_translator_test_ref_ptr_library_child_t* self,
59     int value) {
60   shutdown_checker::AssertNotShutdown();
61 
62   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
63 
64   DCHECK(self);
65   if (!self)
66     return;
67 
68   // Execute
69   CefTranslatorTestRefPtrLibraryChildCppToC::Get(self)->SetOtherValue(value);
70 }
71 
translator_test_ref_ptr_library_child_get_value(struct _cef_translator_test_ref_ptr_library_t * self)72 int CEF_CALLBACK translator_test_ref_ptr_library_child_get_value(
73     struct _cef_translator_test_ref_ptr_library_t* self) {
74   shutdown_checker::AssertNotShutdown();
75 
76   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
77 
78   DCHECK(self);
79   if (!self)
80     return 0;
81 
82   // Execute
83   int _retval =
84       CefTranslatorTestRefPtrLibraryChildCppToC::Get(
85           reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(self))
86           ->GetValue();
87 
88   // Return type: simple
89   return _retval;
90 }
91 
translator_test_ref_ptr_library_child_set_value(struct _cef_translator_test_ref_ptr_library_t * self,int value)92 void CEF_CALLBACK translator_test_ref_ptr_library_child_set_value(
93     struct _cef_translator_test_ref_ptr_library_t* self,
94     int value) {
95   shutdown_checker::AssertNotShutdown();
96 
97   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
98 
99   DCHECK(self);
100   if (!self)
101     return;
102 
103   // Execute
104   CefTranslatorTestRefPtrLibraryChildCppToC::Get(
105       reinterpret_cast<cef_translator_test_ref_ptr_library_child_t*>(self))
106       ->SetValue(value);
107 }
108 
109 }  // namespace
110 
111 // CONSTRUCTOR - Do not edit by hand.
112 
113 CefTranslatorTestRefPtrLibraryChildCppToC::
CefTranslatorTestRefPtrLibraryChildCppToC()114     CefTranslatorTestRefPtrLibraryChildCppToC() {
115   GetStruct()->get_other_value =
116       translator_test_ref_ptr_library_child_get_other_value;
117   GetStruct()->set_other_value =
118       translator_test_ref_ptr_library_child_set_other_value;
119   GetStruct()->base.get_value = translator_test_ref_ptr_library_child_get_value;
120   GetStruct()->base.set_value = translator_test_ref_ptr_library_child_set_value;
121 }
122 
123 // DESTRUCTOR - Do not edit by hand.
124 
125 CefTranslatorTestRefPtrLibraryChildCppToC::
~CefTranslatorTestRefPtrLibraryChildCppToC()126     ~CefTranslatorTestRefPtrLibraryChildCppToC() {
127   shutdown_checker::AssertNotShutdown();
128 }
129 
130 template <>
131 CefRefPtr<CefTranslatorTestRefPtrLibraryChild>
132 CefCppToCRefCounted<CefTranslatorTestRefPtrLibraryChildCppToC,
133                     CefTranslatorTestRefPtrLibraryChild,
134                     cef_translator_test_ref_ptr_library_child_t>::
UnwrapDerived(CefWrapperType type,cef_translator_test_ref_ptr_library_child_t * s)135     UnwrapDerived(CefWrapperType type,
136                   cef_translator_test_ref_ptr_library_child_t* s) {
137   if (type == WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD) {
138     return CefTranslatorTestRefPtrLibraryChildChildCppToC::Unwrap(
139         reinterpret_cast<cef_translator_test_ref_ptr_library_child_child_t*>(
140             s));
141   }
142   NOTREACHED() << "Unexpected class type: " << type;
143   return nullptr;
144 }
145 
146 template <>
147 CefWrapperType CefCppToCRefCounted<
148     CefTranslatorTestRefPtrLibraryChildCppToC,
149     CefTranslatorTestRefPtrLibraryChild,
150     cef_translator_test_ref_ptr_library_child_t>::kWrapperType =
151     WT_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD;
152