• 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=64d48341c3629153282b16d20e858e8166f6dbbd$
13 //
14 
15 #include "libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h"
16 #include "libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h"
17 
18 // VIRTUAL METHODS - Body may be edited by hand.
19 
GetValue()20 NO_SANITIZE("cfi-icall") int CefTranslatorTestScopedClientCToCpp::GetValue() {
21   cef_translator_test_scoped_client_t* _struct = GetStruct();
22   if (CEF_MEMBER_MISSING(_struct, get_value))
23     return 0;
24 
25   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26 
27   // Execute
28   int _retval = _struct->get_value(_struct);
29 
30   // Return type: simple
31   return _retval;
32 }
33 
34 // CONSTRUCTOR - Do not edit by hand.
35 
CefTranslatorTestScopedClientCToCpp()36 CefTranslatorTestScopedClientCToCpp::CefTranslatorTestScopedClientCToCpp() {}
37 
38 // DESTRUCTOR - Do not edit by hand.
39 
~CefTranslatorTestScopedClientCToCpp()40 CefTranslatorTestScopedClientCToCpp::~CefTranslatorTestScopedClientCToCpp() {}
41 
42 template <>
43 cef_translator_test_scoped_client_t*
44 CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
45                 CefTranslatorTestScopedClient,
46                 cef_translator_test_scoped_client_t>::
UnwrapDerivedOwn(CefWrapperType type,CefOwnPtr<CefTranslatorTestScopedClient> c)47     UnwrapDerivedOwn(CefWrapperType type,
48                      CefOwnPtr<CefTranslatorTestScopedClient> c) {
49   if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
50     return reinterpret_cast<cef_translator_test_scoped_client_t*>(
51         CefTranslatorTestScopedClientChildCToCpp::UnwrapOwn(
52             CefOwnPtr<CefTranslatorTestScopedClientChild>(
53                 reinterpret_cast<CefTranslatorTestScopedClientChild*>(
54                     c.release()))));
55   }
56   NOTREACHED() << "Unexpected class type: " << type;
57   return nullptr;
58 }
59 
60 template <>
61 cef_translator_test_scoped_client_t*
62 CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
63                 CefTranslatorTestScopedClient,
64                 cef_translator_test_scoped_client_t>::
UnwrapDerivedRaw(CefWrapperType type,CefRawPtr<CefTranslatorTestScopedClient> c)65     UnwrapDerivedRaw(CefWrapperType type,
66                      CefRawPtr<CefTranslatorTestScopedClient> c) {
67   if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
68     return reinterpret_cast<cef_translator_test_scoped_client_t*>(
69         CefTranslatorTestScopedClientChildCToCpp::UnwrapRaw(
70             CefRawPtr<CefTranslatorTestScopedClientChild>(
71                 reinterpret_cast<CefTranslatorTestScopedClientChild*>(c))));
72   }
73   NOTREACHED() << "Unexpected class type: " << type;
74   return nullptr;
75 }
76 
77 template <>
78 CefWrapperType
79     CefCToCppScoped<CefTranslatorTestScopedClientCToCpp,
80                     CefTranslatorTestScopedClient,
81                     cef_translator_test_scoped_client_t>::kWrapperType =
82         WT_TRANSLATOR_TEST_SCOPED_CLIENT;
83