Skip to main content

engage/generated/app/
gccollectitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-gccollectitem-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::menuitem::{IMenuItem, MenuItem},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/gccollectitem/GCCollectItem.md"))]
14    #[::unity::class(namespace = "App", name = "GCCollectItem")]
15    #[parent(crate::app::menuitem::MenuItem)]
16    pub struct GCCollectItem {}
17}
18
19#[cfg(feature = "app-gccollectitem-types")]
20pub use __types::*;
21
22#[cfg(feature = "app-gccollectitem")]
23pub trait IGCCollectItemMethods: IGCCollectItem {
24    #[doc = "`GetName()` overload"]
25    fn get_name(self) -> ::unity::Il2CppString {
26        unsafe {
27            let __receiver = <GCCollectItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
28            {
29                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
30                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
31                    panic!(
32                        "unity: virtual slot {}
33 out of range (vtable len {}
34) on the runtime class behind {}
35 (method `{}
36`)",
37                        5usize,
38                        __vt.len(),
39                        <GCCollectItem as ::unity::ClassIdentity>::NAME,
40                        "GetName",
41                    )
42                });
43                let __inner: extern "C" fn(GCCollectItem, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
44                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
45                __inner(__receiver, __mi)
46            }
47        }
48    }
49    #[doc = "`ACall()` overload"]
50    fn a_call(self) -> crate::app::menuitem::MenuItem_Result {
51        unsafe {
52            let __receiver = <GCCollectItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
53            {
54                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
55                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
56                    panic!(
57                        "unity: virtual slot {}
58 out of range (vtable len {}
59) on the runtime class behind {}
60 (method `{}
61`)",
62                        12usize,
63                        __vt.len(),
64                        <GCCollectItem as ::unity::ClassIdentity>::NAME,
65                        "ACall",
66                    )
67                });
68                let __inner: extern "C" fn(GCCollectItem, ::unity::OptionalMethod) -> crate::app::menuitem::MenuItem_Result =
69                    ::core::mem::transmute(__vi.method_ptr);
70                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
71                __inner(__receiver, __mi)
72            }
73        }
74    }
75    #[doc = "`.ctor()` overload"]
76    fn ctor(self) -> () {
77        unsafe {
78            let __receiver = <GCCollectItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79            ::unity::il2cpp_call!((::unity::module_base()+0x2276ec0usize)as*mut u8,();
80(GCCollectItem)__receiver)
81        }
82    }
83}
84
85#[cfg(feature = "app-gccollectitem")]
86impl<__T: IGCCollectItem> IGCCollectItemMethods for __T {}
87
88#[cfg(feature = "app-gccollectitem")]
89impl GCCollectItem {
90    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
91        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
92    }
93
94    pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
96    }
97
98    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
99        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
100    }
101}
102
103#[cfg(feature = "app-gccollectitem")]
104impl GCCollectItem {
105    #[doc = "Direct (non-virtual) call to `GCCollectItem`'s own `GetName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
106    pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
107        let __mi = Self::get_name_method_info();
108        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
109        __inner(this.into(), ::core::option::Option::None)
110    }
111
112    #[doc = "Direct (non-virtual) call to `GCCollectItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
113    pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::menuitem::MenuItem_Result {
114        let __mi = Self::a_call_method_info();
115        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::menuitem::MenuItem_Result =
116            ::core::mem::transmute(__mi.method_ptr);
117        __inner(this.into(), ::core::option::Option::None)
118    }
119}
120
121#[cfg(feature = "app-gccollectitem")]
122impl GCCollectItem {
123    #[doc = "`.ctor()` — no args"]
124    pub fn new() -> Self {
125        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
126            panic!(
127                "{}
128::{}
129 failed to instantiate",
130                ::core::stringify!(GCCollectItem),
131                ::core::stringify!(new),
132            )
133        });
134        <Self as IGCCollectItemMethods>::ctor(this);
135        this
136    }
137}
138
139#[cfg(feature = "app-gccollectitem")]
140#[doc(hidden)]
141pub mod prelude {
142    pub use super::{GCCollectItem, IGCCollectItem, IGCCollectItemMethods};
143    #[cfg(feature = "app-menuitem")]
144    pub use crate::app::menuitem::IMenuItemMethods;
145    #[cfg(feature = "system-object")]
146    pub use crate::system::object::IObjectMethods;
147    pub use crate::{app::menuitem::IMenuItem, system::object::IObject};
148}