Skip to main content

engage/generated/system/
object.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-object-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/object/Object.md"))]
10    #[::unity::class(namespace = "System", name = "Object")]
11    pub struct Object {}
12}
13
14#[cfg(feature = "system-object-types")]
15pub use __types::*;
16
17#[cfg(feature = "system-object")]
18impl Object {
19    #[doc = "`Equals(crate::system::object::Object, crate::system::object::Object)` overload"]
20    pub fn equals_2(
21        obj_a: impl ::core::convert::Into<crate::system::object::Object>,
22        obj_b: impl ::core::convert::Into<crate::system::object::Object>,
23    ) -> bool {
24        unsafe {
25            ::unity::il2cpp_call!((::unity::module_base()+0x37df1b0usize)as*mut u8,bool;
26(crate::system::object::Object)::core::convert::Into::into(obj_a),(crate::system::object::Object)::core::convert::Into::into(obj_b))
27        }
28    }
29
30    #[doc = "`InternalGetHashCode(crate::system::object::Object)` overload"]
31    pub fn internal_get_hash_code(o: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
32        unsafe {
33            ::unity::il2cpp_call!((::unity::module_base()+0x37df200usize)as*mut u8,i32;
34(crate::system::object::Object)::core::convert::Into::into(o))
35        }
36    }
37}
38
39#[cfg(feature = "system-object")]
40pub trait IObjectMethods: IObject {
41    #[doc = "`Equals(crate::system::object::Object)` overload"]
42    fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
43        unsafe {
44            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
45            {
46                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
47                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
48                    panic!(
49                        "unity: virtual slot {}
50 out of range (vtable len {}
51) on the runtime class behind {}
52 (method `{}
53`)",
54                        0usize,
55                        __vt.len(),
56                        <Object as ::unity::ClassIdentity>::NAME,
57                        "Equals",
58                    )
59                });
60                let __inner: extern "C" fn(Object, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
61                    ::core::mem::transmute(__vi.method_ptr);
62                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
63                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
64            }
65        }
66    }
67    #[doc = "`.ctor()` overload"]
68    fn ctor(self) -> () {
69        unsafe {
70            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
71            ::unity::il2cpp_call!((::unity::module_base()+0x37d2b40usize)as*mut u8,();
72(Object)__receiver)
73        }
74    }
75    #[doc = "`Finalize()` overload"]
76    fn finalize(self) -> () {
77        unsafe {
78            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79            {
80                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
81                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
82                    panic!(
83                        "unity: virtual slot {}
84 out of range (vtable len {}
85) on the runtime class behind {}
86 (method `{}
87`)",
88                        1usize,
89                        __vt.len(),
90                        <Object as ::unity::ClassIdentity>::NAME,
91                        "Finalize",
92                    )
93                });
94                let __inner: extern "C" fn(Object, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
95                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
96                __inner(__receiver, __mi)
97            }
98        }
99    }
100    #[doc = "`GetHashCode()` overload"]
101    fn get_hash_code(self) -> i32 {
102        unsafe {
103            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
104            {
105                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
106                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
107                    panic!(
108                        "unity: virtual slot {}
109 out of range (vtable len {}
110) on the runtime class behind {}
111 (method `{}
112`)",
113                        2usize,
114                        __vt.len(),
115                        <Object as ::unity::ClassIdentity>::NAME,
116                        "GetHashCode",
117                    )
118                });
119                let __inner: extern "C" fn(Object, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
120                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
121                __inner(__receiver, __mi)
122            }
123        }
124    }
125    #[doc = "`GetType()` overload"]
126    fn get_type(self) -> ::unity::SystemType {
127        unsafe {
128            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
129            ::unity::il2cpp_call!((::unity::module_base()+0x37ded90usize)as*mut u8, ::unity::SystemType;
130(Object)__receiver)
131        }
132    }
133    #[doc = "`MemberwiseClone()` overload"]
134    fn memberwise_clone(self) -> crate::system::object::Object {
135        unsafe {
136            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
137            ::unity::il2cpp_call!((::unity::module_base()+0x37d7690usize)as*mut u8,crate::system::object::Object;
138(Object)__receiver)
139        }
140    }
141    #[doc = "`ToString()` overload"]
142    fn to_string(self) -> ::unity::Il2CppString {
143        unsafe {
144            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
145            {
146                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
147                let __vi = *__vt.get(3usize).unwrap_or_else(|| {
148                    panic!(
149                        "unity: virtual slot {}
150 out of range (vtable len {}
151) on the runtime class behind {}
152 (method `{}
153`)",
154                        3usize,
155                        __vt.len(),
156                        <Object as ::unity::ClassIdentity>::NAME,
157                        "ToString",
158                    )
159                });
160                let __inner: extern "C" fn(Object, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
161                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
162                __inner(__receiver, __mi)
163            }
164        }
165    }
166    #[doc = "`FieldGetter(::unity::Il2CppString, ::unity::Il2CppString, *mut::unity::IlInstance)` overload"]
167    fn field_getter(
168        self,
169        type_name: impl ::core::convert::Into<::unity::Il2CppString>,
170        field_name: impl ::core::convert::Into<::unity::Il2CppString>,
171    ) -> ::unity::IlInstance {
172        unsafe {
173            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
174            let mut __out_0 = ::core::mem::MaybeUninit::<::unity::IlInstance>::uninit();
175            ::unity::il2cpp_call!((::unity::module_base()+0x37df230usize)as*mut u8,();
176(Object)__receiver,(::unity::Il2CppString)::core::convert::Into::into(type_name),(::unity::Il2CppString)::core::convert::Into::into(field_name),(*mut::unity::IlInstance)__out_0.as_mut_ptr());
177            __out_0.assume_init()
178        }
179    }
180    #[doc = "`FieldSetter(::unity::Il2CppString, ::unity::Il2CppString, crate::system::object::Object)` overload"]
181    fn field_setter(
182        self,
183        type_name: impl ::core::convert::Into<::unity::Il2CppString>,
184        field_name: impl ::core::convert::Into<::unity::Il2CppString>,
185        val: impl ::core::convert::Into<crate::system::object::Object>,
186    ) -> () {
187        unsafe {
188            let __receiver = <Object as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
189            ::unity::il2cpp_call!((::unity::module_base()+0x37df240usize)as*mut u8,();
190(Object)__receiver,(::unity::Il2CppString)::core::convert::Into::into(type_name),(::unity::Il2CppString)::core::convert::Into::into(field_name),(crate::system::object::Object)::core::convert::Into::into(val))
191        }
192    }
193}
194
195#[cfg(feature = "system-object")]
196impl<__T: IObject> IObjectMethods for __T {}
197
198#[cfg(feature = "system-object")]
199impl Object {
200    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
201        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
202    }
203
204    pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
205        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
206    }
207
208    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
210    }
211
212    pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
214    }
215
216    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
218    }
219
220    pub fn get_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
222    }
223
224    pub fn memberwise_clone_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
226    }
227
228    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
230    }
231
232    pub fn internal_get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
234    }
235
236    pub fn field_getter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
237        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
238    }
239
240    pub fn field_setter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
241        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
242    }
243}
244
245#[cfg(feature = "system-object")]
246impl Object {
247    #[doc = "Direct (non-virtual) call to `Object`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
248    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
249        let __mi = Self::equals_method_info();
250        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
251            ::core::mem::transmute(__mi.method_ptr);
252        __inner(this.into(), obj, ::core::option::Option::None)
253    }
254
255    #[doc = "Direct (non-virtual) call to `Object`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
256    pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
257        let __mi = Self::finalize_method_info();
258        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
259        __inner(this.into(), ::core::option::Option::None)
260    }
261
262    #[doc = "Direct (non-virtual) call to `Object`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
263    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
264        let __mi = Self::get_hash_code_method_info();
265        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
266        __inner(this.into(), ::core::option::Option::None)
267    }
268
269    #[doc = "Direct (non-virtual) call to `Object`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
270    pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
271        let __mi = Self::to_string_method_info();
272        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
273        __inner(this.into(), ::core::option::Option::None)
274    }
275}
276
277#[cfg(feature = "system-object")]
278impl Object {
279    #[doc = "`.ctor()` — no args"]
280    pub fn new() -> Self {
281        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
282            panic!(
283                "{}
284::{}
285 failed to instantiate",
286                ::core::stringify!(Object),
287                ::core::stringify!(new),
288            )
289        });
290        <Self as IObjectMethods>::ctor(this);
291        this
292    }
293}
294
295#[cfg(feature = "system-object")]
296#[doc(hidden)]
297pub mod prelude {
298    pub use super::{IObject, IObjectMethods, Object};
299}