Skip to main content

engage/generated/app/
capabilityshort.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-capabilityshort-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::{
10            capabilitybase_1::{CapabilityBase_1, ICapabilityBase_1},
11            capabilitydefinition::{CapabilityDefinition, ICapabilityDefinition},
12        },
13        system::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/capabilityshort/CapabilityShort.md"))]
17    #[::unity::class(namespace = "App", name = "CapabilityShort")]
18    #[parent(crate::app::capabilitybase_1::CapabilityBase_1<i16>)]
19    pub struct CapabilityShort {
20        #[static_field]
21        #[rename(name = "Min")]
22        pub min: i32,
23        #[static_field]
24        #[rename(name = "Max")]
25        pub max: i32,
26    }
27}
28
29#[cfg(feature = "app-capabilityshort-types")]
30pub use __types::*;
31
32#[cfg(feature = "app-capabilityshort")]
33pub trait ICapabilityShortMethods: ICapabilityShort {
34    #[doc = "`.ctor(i16)` overload"]
35    fn ctor(self, value: impl ::core::convert::Into<i16>) -> () {
36        unsafe {
37            let __receiver = <CapabilityShort as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
38            ::unity::il2cpp_call!((::unity::module_base()+0x25be160usize)as*mut u8,();
39(CapabilityShort)__receiver,(i16)::core::convert::Into::into(value))
40        }
41    }
42    #[doc = "`Add(i32, i16)` overload"]
43    fn add(self, i: impl ::core::convert::Into<i32>, v: impl ::core::convert::Into<i16>) -> () {
44        unsafe {
45            let __receiver = <CapabilityShort as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
46            {
47                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
48                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
49                    panic!(
50                        "unity: virtual slot {}
51 out of range (vtable len {}
52) on the runtime class behind {}
53 (method `{}
54`)",
55                        5usize,
56                        __vt.len(),
57                        <CapabilityShort as ::unity::ClassIdentity>::NAME,
58                        "Add",
59                    )
60                });
61                let __inner: extern "C" fn(CapabilityShort, i32, i16, ::unity::OptionalMethod) -> () = ::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(i), ::core::convert::Into::into(v), __mi)
64            }
65        }
66    }
67    #[doc = "`IsZero()` overload"]
68    fn is_zero(self) -> bool {
69        unsafe {
70            let __receiver = <CapabilityShort as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
71            {
72                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
73                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
74                    panic!(
75                        "unity: virtual slot {}
76 out of range (vtable len {}
77) on the runtime class behind {}
78 (method `{}
79`)",
80                        6usize,
81                        __vt.len(),
82                        <CapabilityShort as ::unity::ClassIdentity>::NAME,
83                        "IsZero",
84                    )
85                });
86                let __inner: extern "C" fn(CapabilityShort, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
87                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
88                __inner(__receiver, __mi)
89            }
90        }
91    }
92    #[doc = "`WriteToStream(crate::app::stream_2::Stream_2, i16)` overload"]
93    fn write_to_stream(self, stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>, v: impl ::core::convert::Into<i16>) -> () {
94        unsafe {
95            let __receiver = <CapabilityShort as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
96            {
97                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
98                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
99                    panic!(
100                        "unity: virtual slot {}
101 out of range (vtable len {}
102) on the runtime class behind {}
103 (method `{}
104`)",
105                        7usize,
106                        __vt.len(),
107                        <CapabilityShort as ::unity::ClassIdentity>::NAME,
108                        "WriteToStream",
109                    )
110                });
111                let __inner: extern "C" fn(CapabilityShort, crate::app::stream_2::Stream_2, i16, ::unity::OptionalMethod) -> () =
112                    ::core::mem::transmute(__vi.method_ptr);
113                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
114                __inner(__receiver, ::core::convert::Into::into(stream), ::core::convert::Into::into(v), __mi)
115            }
116        }
117    }
118    #[doc = "`ReadFromStream(crate::app::stream_2::Stream_2)` overload"]
119    fn read_from_stream(self, stream: impl ::core::convert::Into<crate::app::stream_2::Stream_2>) -> i16 {
120        unsafe {
121            let __receiver = <CapabilityShort as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122            {
123                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
125                    panic!(
126                        "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131                        8usize,
132                        __vt.len(),
133                        <CapabilityShort as ::unity::ClassIdentity>::NAME,
134                        "ReadFromStream",
135                    )
136                });
137                let __inner: extern "C" fn(CapabilityShort, crate::app::stream_2::Stream_2, ::unity::OptionalMethod) -> i16 =
138                    ::core::mem::transmute(__vi.method_ptr);
139                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
140                __inner(__receiver, ::core::convert::Into::into(stream), __mi)
141            }
142        }
143    }
144}
145
146#[cfg(feature = "app-capabilityshort")]
147impl<__T: ICapabilityShort> ICapabilityShortMethods for __T {}
148
149#[cfg(feature = "app-capabilityshort")]
150impl CapabilityShort {
151    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
153    }
154
155    pub fn add_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
157    }
158
159    pub fn is_zero_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
161    }
162
163    pub fn write_to_stream_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
165    }
166
167    pub fn read_from_stream_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
169    }
170}
171
172#[cfg(feature = "app-capabilityshort")]
173impl CapabilityShort {
174    #[doc = "Direct (non-virtual) call to `CapabilityShort`'s own `Add`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
175    pub unsafe fn add(this: impl ::core::convert::Into<::unity::IlInstance>, i: i32, v: i16) -> () {
176        let __mi = Self::add_method_info();
177        let __inner: extern "C" fn(::unity::IlInstance, i32, i16, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
178        __inner(this.into(), i, v, ::core::option::Option::None)
179    }
180
181    #[doc = "Direct (non-virtual) call to `CapabilityShort`'s own `IsZero`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
182    pub unsafe fn is_zero(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
183        let __mi = Self::is_zero_method_info();
184        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
185        __inner(this.into(), ::core::option::Option::None)
186    }
187
188    #[doc = "Direct (non-virtual) call to `CapabilityShort`'s own `WriteToStream`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
189    pub unsafe fn write_to_stream(this: impl ::core::convert::Into<::unity::IlInstance>, stream: crate::app::stream_2::Stream_2, v: i16) -> () {
190        let __mi = Self::write_to_stream_method_info();
191        let __inner: extern "C" fn(::unity::IlInstance, crate::app::stream_2::Stream_2, i16, ::unity::OptionalMethod) -> () =
192            ::core::mem::transmute(__mi.method_ptr);
193        __inner(this.into(), stream, v, ::core::option::Option::None)
194    }
195
196    #[doc = "Direct (non-virtual) call to `CapabilityShort`'s own `ReadFromStream`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
197    pub unsafe fn read_from_stream(this: impl ::core::convert::Into<::unity::IlInstance>, stream: crate::app::stream_2::Stream_2) -> i16 {
198        let __mi = Self::read_from_stream_method_info();
199        let __inner: extern "C" fn(::unity::IlInstance, crate::app::stream_2::Stream_2, ::unity::OptionalMethod) -> i16 =
200            ::core::mem::transmute(__mi.method_ptr);
201        __inner(this.into(), stream, ::core::option::Option::None)
202    }
203}
204
205#[cfg(feature = "app-capabilityshort")]
206impl CapabilityShort {
207    #[doc = "`.ctor(i16)` — overload selector"]
208    pub fn new(value: i16) -> Self {
209        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
210            panic!(
211                "{}
212::{}
213 failed to instantiate",
214                ::core::stringify!(CapabilityShort),
215                ::core::stringify!(new),
216            )
217        });
218        <Self as ICapabilityShortMethods>::ctor(this, value);
219        this
220    }
221}
222
223#[cfg(feature = "app-capabilityshort")]
224#[doc(hidden)]
225pub mod prelude {
226    pub use super::{CapabilityShort, ICapabilityShort, ICapabilityShortMethods};
227    #[cfg(feature = "app-capabilitybase_1")]
228    pub use crate::app::capabilitybase_1::ICapabilityBase_1Methods;
229    #[cfg(feature = "app-capabilitydefinition")]
230    pub use crate::app::capabilitydefinition::ICapabilityDefinitionMethods;
231    #[cfg(feature = "system-object")]
232    pub use crate::system::object::IObjectMethods;
233    pub use crate::{
234        app::{capabilitybase_1::ICapabilityBase_1, capabilitydefinition::ICapabilityDefinition},
235        system::object::IObject,
236    };
237}