Skip to main content

engage/generated/app/
stringitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-stringitem-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/stringitem/StringItem.md"))]
14    #[::unity::class(namespace = "App", name = "StringItem")]
15    #[parent(crate::app::menuitem::MenuItem)]
16    pub struct StringItem {
17        #[offset(32)]
18        #[rename(name = "m_Name")]
19        pub m_name: ::unity::Il2CppString,
20        #[offset(40)]
21        #[rename(name = "m_English")]
22        pub m_english: ::unity::Il2CppString,
23    }
24}
25
26#[cfg(feature = "app-stringitem-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-stringitem")]
30pub trait IStringItemMethods: IStringItem {
31    #[doc = "`.ctor()` overload"]
32    fn ctor(self) -> () {
33        unsafe {
34            let __receiver = <StringItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            ::unity::il2cpp_call!((::unity::module_base()+0x250a9e0usize)as*mut u8,();
36(StringItem)__receiver)
37        }
38    }
39    #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
40    fn ctor_2(self, name: impl ::core::convert::Into<::unity::Il2CppString>, english: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
41        unsafe {
42            let __receiver = <StringItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43            ::unity::il2cpp_call!((::unity::module_base()+0x250aac0usize)as*mut u8,();
44(StringItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(::unity::Il2CppString)::core::convert::Into::into(english))
45        }
46    }
47    #[doc = "`GetName()` overload"]
48    fn get_name(self) -> ::unity::Il2CppString {
49        unsafe {
50            let __receiver = <StringItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51            {
52                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
53                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
54                    panic!(
55                        "unity: virtual slot {}
56 out of range (vtable len {}
57) on the runtime class behind {}
58 (method `{}
59`)",
60                        5usize,
61                        __vt.len(),
62                        <StringItem as ::unity::ClassIdentity>::NAME,
63                        "GetName",
64                    )
65                });
66                let __inner: extern "C" fn(StringItem, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
67                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
68                __inner(__receiver, __mi)
69            }
70        }
71    }
72    #[doc = "`GetNameEnglish()` overload"]
73    fn get_name_english(self) -> ::unity::Il2CppString {
74        unsafe {
75            let __receiver = <StringItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76            {
77                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
78                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
79                    panic!(
80                        "unity: virtual slot {}
81 out of range (vtable len {}
82) on the runtime class behind {}
83 (method `{}
84`)",
85                        6usize,
86                        __vt.len(),
87                        <StringItem as ::unity::ClassIdentity>::NAME,
88                        "GetNameEnglish",
89                    )
90                });
91                let __inner: extern "C" fn(StringItem, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
92                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
93                __inner(__receiver, __mi)
94            }
95        }
96    }
97    #[doc = "`SetName(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
98    fn set_name(self, name: impl ::core::convert::Into<::unity::Il2CppString>, english: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
99        unsafe {
100            let __receiver = <StringItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
101            ::unity::il2cpp_call!((::unity::module_base()+0x250aa60usize)as*mut u8,();
102(StringItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(::unity::Il2CppString)::core::convert::Into::into(english))
103        }
104    }
105    #[doc = "`ACall()` overload"]
106    fn a_call(self) -> crate::app::menuitem::MenuItem_Result {
107        unsafe {
108            let __receiver = <StringItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
109            {
110                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
111                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
112                    panic!(
113                        "unity: virtual slot {}
114 out of range (vtable len {}
115) on the runtime class behind {}
116 (method `{}
117`)",
118                        12usize,
119                        __vt.len(),
120                        <StringItem as ::unity::ClassIdentity>::NAME,
121                        "ACall",
122                    )
123                });
124                let __inner: extern "C" fn(StringItem, ::unity::OptionalMethod) -> crate::app::menuitem::MenuItem_Result =
125                    ::core::mem::transmute(__vi.method_ptr);
126                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
127                __inner(__receiver, __mi)
128            }
129        }
130    }
131}
132
133#[cfg(feature = "app-stringitem")]
134impl<__T: IStringItem> IStringItemMethods for __T {}
135
136#[cfg(feature = "app-stringitem")]
137impl StringItem {
138    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
139        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
140    }
141
142    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
143        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
144    }
145
146    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
147        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
148    }
149
150    pub fn get_name_english_method_info() -> &'static ::unity::il2cpp::MethodInfo {
151        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
152    }
153
154    pub fn set_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
155        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
156    }
157
158    pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
159        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
160    }
161}
162
163#[cfg(feature = "app-stringitem")]
164impl StringItem {
165    #[doc = "Direct (non-virtual) call to `StringItem`'s own `GetName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
166    pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
167        let __mi = Self::get_name_method_info();
168        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
169        __inner(this.into(), ::core::option::Option::None)
170    }
171
172    #[doc = "Direct (non-virtual) call to `StringItem`'s own `GetNameEnglish`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
173    pub unsafe fn get_name_english(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
174        let __mi = Self::get_name_english_method_info();
175        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
176        __inner(this.into(), ::core::option::Option::None)
177    }
178
179    #[doc = "Direct (non-virtual) call to `StringItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
180    pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::menuitem::MenuItem_Result {
181        let __mi = Self::a_call_method_info();
182        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::menuitem::MenuItem_Result =
183            ::core::mem::transmute(__mi.method_ptr);
184        __inner(this.into(), ::core::option::Option::None)
185    }
186}
187
188#[cfg(feature = "app-stringitem")]
189impl StringItem {
190    #[doc = "`.ctor()` — no args"]
191    pub fn new() -> Self {
192        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
193            panic!(
194                "{}
195::{}
196 failed to instantiate",
197                ::core::stringify!(StringItem),
198                ::core::stringify!(new),
199            )
200        });
201        <Self as IStringItemMethods>::ctor(this);
202        this
203    }
204
205    #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` — overload selector"]
206    pub fn new_2(name: ::unity::Il2CppString, english: ::unity::Il2CppString) -> Self {
207        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
208            panic!(
209                "{}
210::{}
211 failed to instantiate",
212                ::core::stringify!(StringItem),
213                ::core::stringify!(new_2),
214            )
215        });
216        <Self as IStringItemMethods>::ctor_2(this, name, english);
217        this
218    }
219}
220
221#[cfg(feature = "app-stringitem")]
222#[doc(hidden)]
223pub mod prelude {
224    pub use super::{IStringItem, IStringItemMethods, StringItem};
225    #[cfg(feature = "app-menuitem")]
226    pub use crate::app::menuitem::IMenuItemMethods;
227    #[cfg(feature = "system-object")]
228    pub use crate::system::object::IObjectMethods;
229    pub use crate::{app::menuitem::IMenuItem, system::object::IObject};
230}