Skip to main content

engage/generated/system/reflection/
pointer.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-reflection-pointer-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/reflection/pointer/Pointer.md"))]
11    #[::unity::class(namespace = "System.Reflection", name = "Pointer")]
12    #[parent(crate::system::object::Object)]
13    pub struct Pointer {
14        #[offset(24)]
15        #[rename(name = "_ptrType")]
16        pub ptr_type: crate::system::runtimetype::RuntimeType,
17    }
18}
19
20#[cfg(feature = "system-reflection-pointer-types")]
21pub use __types::*;
22
23#[cfg(feature = "system-reflection-pointer")]
24pub trait IPointerMethods: IPointer {
25    #[doc = "`.ctor()` overload"]
26    fn ctor(self) -> () {
27        unsafe {
28            let __receiver = <Pointer as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29            ::unity::il2cpp_call!((::unity::module_base()+0x376a530usize)as*mut u8,();
30(Pointer)__receiver)
31        }
32    }
33}
34
35#[cfg(feature = "system-reflection-pointer")]
36impl<__T: IPointer> IPointerMethods for __T {}
37
38#[cfg(feature = "system-reflection-pointer")]
39impl Pointer {
40    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
41        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
42    }
43}
44
45#[cfg(feature = "system-reflection-pointer")]
46impl Pointer {
47    #[doc = "`.ctor()` — no args"]
48    pub fn new() -> Self {
49        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
50            panic!(
51                "{}
52::{}
53 failed to instantiate",
54                ::core::stringify!(Pointer),
55                ::core::stringify!(new),
56            )
57        });
58        <Self as IPointerMethods>::ctor(this);
59        this
60    }
61}
62
63#[cfg(feature = "system-reflection-pointer")]
64#[doc(hidden)]
65pub mod prelude {
66    pub use super::{IPointer, IPointerMethods, Pointer};
67    pub use crate::system::object::IObject;
68    #[cfg(feature = "system-object")]
69    pub use crate::system::object::IObjectMethods;
70}