Skip to main content

engage/generated/app/
procvoidfunction.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-procvoidfunction-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        delegate::{Delegate, IDelegate},
10        multicastdelegate::{IMulticastDelegate, MulticastDelegate},
11        object::{IObject, Object},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/procvoidfunction/ProcVoidFunction.md"))]
15    #[::unity::class(namespace = "App", name = "ProcVoidFunction")]
16    #[parent(crate::system::multicastdelegate::MulticastDelegate)]
17    pub struct ProcVoidFunction {}
18}
19
20#[cfg(feature = "app-procvoidfunction-types")]
21pub use __types::*;
22
23#[cfg(feature = "app-procvoidfunction")]
24pub trait IProcVoidFunctionMethods: IProcVoidFunction {
25    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
26    fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
27        unsafe {
28            let __receiver = <ProcVoidFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29            ::unity::il2cpp_call!((::unity::module_base()+0x28212a0usize)as*mut u8,();
30(ProcVoidFunction)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
31        }
32    }
33    #[doc = "`Invoke(crate::app::procinst::ProcInst)` overload"]
34    fn invoke(self, inst: impl ::core::convert::Into<crate::app::procinst::ProcInst>) -> () {
35        unsafe {
36            let __receiver = <ProcVoidFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
37            {
38                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
39                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
40                    panic!(
41                        "unity: virtual slot {}
42 out of range (vtable len {}
43) on the runtime class behind {}
44 (method `{}
45`)",
46                        13usize,
47                        __vt.len(),
48                        <ProcVoidFunction as ::unity::ClassIdentity>::NAME,
49                        "Invoke",
50                    )
51                });
52                let __inner: extern "C" fn(ProcVoidFunction, crate::app::procinst::ProcInst, ::unity::OptionalMethod) -> () =
53                    ::core::mem::transmute(__vi.method_ptr);
54                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
55                __inner(__receiver, ::core::convert::Into::into(inst), __mi)
56            }
57        }
58    }
59}
60
61#[cfg(feature = "app-procvoidfunction")]
62impl<__T: IProcVoidFunction> IProcVoidFunctionMethods for __T {}
63
64#[cfg(feature = "app-procvoidfunction")]
65impl ProcVoidFunction {
66    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
67        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
68    }
69
70    pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
71        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
72    }
73}
74
75#[cfg(feature = "app-procvoidfunction")]
76impl ProcVoidFunction {
77    #[doc = "Direct (non-virtual) call to `ProcVoidFunction`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
78    pub unsafe fn invoke(this: impl ::core::convert::Into<::unity::IlInstance>, inst: crate::app::procinst::ProcInst) -> () {
79        let __mi = Self::invoke_method_info();
80        let __inner: extern "C" fn(::unity::IlInstance, crate::app::procinst::ProcInst, ::unity::OptionalMethod) -> () =
81            ::core::mem::transmute(__mi.method_ptr);
82        __inner(this.into(), inst, ::core::option::Option::None)
83    }
84}
85
86#[cfg(feature = "app-procvoidfunction")]
87impl ProcVoidFunction {
88    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
89    pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
90        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
91            panic!(
92                "{}
93::{}
94 failed to instantiate",
95                ::core::stringify!(ProcVoidFunction),
96                ::core::stringify!(new),
97            )
98        });
99        <Self as IProcVoidFunctionMethods>::ctor(this, object, method);
100        this
101    }
102}
103
104#[cfg(feature = "app-procvoidfunction")]
105#[doc(hidden)]
106pub mod prelude {
107    pub use super::{IProcVoidFunction, IProcVoidFunctionMethods, ProcVoidFunction};
108    #[cfg(feature = "system-delegate")]
109    pub use crate::system::delegate::IDelegateMethods;
110    #[cfg(feature = "system-multicastdelegate")]
111    pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
112    #[cfg(feature = "system-object")]
113    pub use crate::system::object::IObjectMethods;
114    pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject};
115}