1#[cfg(feature = "app-functioncommand-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::calculatorcommand::{CalculatorCommand, ICalculatorCommand},
10 system::object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/functioncommand/FunctionCommand.md"))]
14 #[::unity::class(namespace = "App", name = "FunctionCommand")]
15 #[parent(crate::app::calculatorcommand::CalculatorCommand)]
16 pub struct FunctionCommand {
17 #[offset(24)]
18 #[rename(name = "m_Name")]
19 pub m_name: ::unity::Il2CppString,
20 #[offset(32)]
21 #[rename(name = "m_Function")]
22 pub m_function: crate::app::stringcalculator::StringCalculator,
23 }
24}
25
26#[cfg(feature = "app-functioncommand-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-functioncommand")]
30pub trait IFunctionCommandMethods: IFunctionCommand {
31 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
32 fn ctor(self, name: impl ::core::convert::Into<::unity::Il2CppString>, func: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
33 unsafe {
34 let __receiver = <FunctionCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35 ::unity::il2cpp_call!((::unity::module_base()+0x2276a10usize)as*mut u8,();
36(FunctionCommand)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(::unity::Il2CppString)::core::convert::Into::into(func))
37 }
38 }
39 #[doc = "`get_Name()` overload"]
40 fn get_name(self) -> ::unity::Il2CppString {
41 unsafe {
42 let __receiver = <FunctionCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43 {
44 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
45 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
46 panic!(
47 "unity: virtual slot {}
48 out of range (vtable len {}
49) on the runtime class behind {}
50 (method `{}
51`)",
52 4usize,
53 __vt.len(),
54 <FunctionCommand as ::unity::ClassIdentity>::NAME,
55 "get_Name",
56 )
57 });
58 let __inner: extern "C" fn(FunctionCommand, ::unity::OptionalMethod) -> ::unity::Il2CppString =
59 ::core::mem::transmute(__vi.method_ptr);
60 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
61 __inner(__receiver, __mi)
62 }
63 }
64 }
65 #[doc = "`Get(crate::system::object::Object)` overload"]
66 fn get(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> f32 {
67 unsafe {
68 let __receiver = <FunctionCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
69 {
70 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
71 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
72 panic!(
73 "unity: virtual slot {}
74 out of range (vtable len {}
75) on the runtime class behind {}
76 (method `{}
77`)",
78 10usize,
79 __vt.len(),
80 <FunctionCommand as ::unity::ClassIdentity>::NAME,
81 "Get",
82 )
83 });
84 let __inner: extern "C" fn(FunctionCommand, crate::system::object::Object, ::unity::OptionalMethod) -> f32 =
85 ::core::mem::transmute(__vi.method_ptr);
86 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
87 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
88 }
89 }
90 }
91 #[doc = "`Get(crate::system::object::Object, crate::system::object::Object)` overload"]
92 fn get_2(
93 self,
94 obj1: impl ::core::convert::Into<crate::system::object::Object>,
95 obj2: impl ::core::convert::Into<crate::system::object::Object>,
96 ) -> f32 {
97 unsafe {
98 let __receiver = <FunctionCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99 {
100 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
101 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
102 panic!(
103 "unity: virtual slot {}
104 out of range (vtable len {}
105) on the runtime class behind {}
106 (method `{}
107`)",
108 11usize,
109 __vt.len(),
110 <FunctionCommand as ::unity::ClassIdentity>::NAME,
111 "Get",
112 )
113 });
114 let __inner: extern "C" fn(
115 FunctionCommand,
116 crate::system::object::Object,
117 crate::system::object::Object,
118 ::unity::OptionalMethod,
119 ) -> f32 = ::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, ::core::convert::Into::into(obj1), ::core::convert::Into::into(obj2), __mi)
122 }
123 }
124 }
125 #[doc = "`Func(crate::system::collections::generic::list_1::List_1<f32>, crate::system::object::Object)` overload"]
126 fn func(
127 self,
128 args: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<f32>>,
129 obj: impl ::core::convert::Into<crate::system::object::Object>,
130 ) -> f32 {
131 unsafe {
132 let __receiver = <FunctionCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
133 {
134 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
135 let __vi = *__vt.get(25usize).unwrap_or_else(|| {
136 panic!(
137 "unity: virtual slot {}
138 out of range (vtable len {}
139) on the runtime class behind {}
140 (method `{}
141`)",
142 25usize,
143 __vt.len(),
144 <FunctionCommand as ::unity::ClassIdentity>::NAME,
145 "Func",
146 )
147 });
148 let __inner: extern "C" fn(
149 FunctionCommand,
150 crate::system::collections::generic::list_1::List_1<f32>,
151 crate::system::object::Object,
152 ::unity::OptionalMethod,
153 ) -> f32 = ::core::mem::transmute(__vi.method_ptr);
154 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
155 __inner(__receiver, ::core::convert::Into::into(args), ::core::convert::Into::into(obj), __mi)
156 }
157 }
158 }
159 #[doc = "`Func(crate::system::collections::generic::list_1::List_1<f32>, crate::system::object::Object, crate::system::object::Object)` overload"]
160 fn func_2(
161 self,
162 args: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<f32>>,
163 obj1: impl ::core::convert::Into<crate::system::object::Object>,
164 obj2: impl ::core::convert::Into<crate::system::object::Object>,
165 ) -> f32 {
166 unsafe {
167 let __receiver = <FunctionCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
168 {
169 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
170 let __vi = *__vt.get(26usize).unwrap_or_else(|| {
171 panic!(
172 "unity: virtual slot {}
173 out of range (vtable len {}
174) on the runtime class behind {}
175 (method `{}
176`)",
177 26usize,
178 __vt.len(),
179 <FunctionCommand as ::unity::ClassIdentity>::NAME,
180 "Func",
181 )
182 });
183 let __inner: extern "C" fn(
184 FunctionCommand,
185 crate::system::collections::generic::list_1::List_1<f32>,
186 crate::system::object::Object,
187 crate::system::object::Object,
188 ::unity::OptionalMethod,
189 ) -> f32 = ::core::mem::transmute(__vi.method_ptr);
190 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
191 __inner(
192 __receiver,
193 ::core::convert::Into::into(args),
194 ::core::convert::Into::into(obj1),
195 ::core::convert::Into::into(obj2),
196 __mi,
197 )
198 }
199 }
200 }
201}
202
203#[cfg(feature = "app-functioncommand")]
204impl<__T: IFunctionCommand> IFunctionCommandMethods for __T {}
205
206#[cfg(feature = "app-functioncommand")]
207impl FunctionCommand {
208 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
210 }
211
212 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
214 }
215
216 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
218 }
219
220 pub fn get_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
222 }
223
224 pub fn func_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
226 }
227
228 pub fn func_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
230 }
231}
232
233#[cfg(feature = "app-functioncommand")]
234impl FunctionCommand {
235 #[doc = "Direct (non-virtual) call to `FunctionCommand`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
236 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
237 let __mi = Self::get_name_method_info();
238 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
239 __inner(this.into(), ::core::option::Option::None)
240 }
241
242 #[doc = "Direct (non-virtual) call to `FunctionCommand`'s own `Get`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
243 pub unsafe fn get(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> f32 {
244 let __mi = Self::get_method_info();
245 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> f32 =
246 ::core::mem::transmute(__mi.method_ptr);
247 __inner(this.into(), obj, ::core::option::Option::None)
248 }
249
250 #[doc = "Direct (non-virtual) call to `FunctionCommand`'s own `Get`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
251 pub unsafe fn get_2(
252 this: impl ::core::convert::Into<::unity::IlInstance>,
253 obj1: crate::system::object::Object,
254 obj2: crate::system::object::Object,
255 ) -> f32 {
256 let __mi = Self::get_2_method_info();
257 let __inner: extern "C" fn(
258 ::unity::IlInstance,
259 crate::system::object::Object,
260 crate::system::object::Object,
261 ::unity::OptionalMethod,
262 ) -> f32 = ::core::mem::transmute(__mi.method_ptr);
263 __inner(this.into(), obj1, obj2, ::core::option::Option::None)
264 }
265
266 #[doc = "Direct (non-virtual) call to `FunctionCommand`'s own `Func`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
267 pub unsafe fn func(
268 this: impl ::core::convert::Into<::unity::IlInstance>,
269 args: crate::system::collections::generic::list_1::List_1<f32>,
270 obj: crate::system::object::Object,
271 ) -> f32 {
272 let __mi = Self::func_method_info();
273 let __inner: extern "C" fn(
274 ::unity::IlInstance,
275 crate::system::collections::generic::list_1::List_1<f32>,
276 crate::system::object::Object,
277 ::unity::OptionalMethod,
278 ) -> f32 = ::core::mem::transmute(__mi.method_ptr);
279 __inner(this.into(), args, obj, ::core::option::Option::None)
280 }
281
282 #[doc = "Direct (non-virtual) call to `FunctionCommand`'s own `Func`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
283 pub unsafe fn func_2(
284 this: impl ::core::convert::Into<::unity::IlInstance>,
285 args: crate::system::collections::generic::list_1::List_1<f32>,
286 obj1: crate::system::object::Object,
287 obj2: crate::system::object::Object,
288 ) -> f32 {
289 let __mi = Self::func_2_method_info();
290 let __inner: extern "C" fn(
291 ::unity::IlInstance,
292 crate::system::collections::generic::list_1::List_1<f32>,
293 crate::system::object::Object,
294 crate::system::object::Object,
295 ::unity::OptionalMethod,
296 ) -> f32 = ::core::mem::transmute(__mi.method_ptr);
297 __inner(this.into(), args, obj1, obj2, ::core::option::Option::None)
298 }
299}
300
301#[cfg(feature = "app-functioncommand")]
302impl FunctionCommand {
303 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` — overload selector"]
304 pub fn new(name: ::unity::Il2CppString, func: ::unity::Il2CppString) -> Self {
305 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
306 panic!(
307 "{}
308::{}
309 failed to instantiate",
310 ::core::stringify!(FunctionCommand),
311 ::core::stringify!(new),
312 )
313 });
314 <Self as IFunctionCommandMethods>::ctor(this, name, func);
315 this
316 }
317}
318
319#[cfg(feature = "app-functioncommand")]
320#[doc(hidden)]
321pub mod prelude {
322 pub use super::{FunctionCommand, IFunctionCommand, IFunctionCommandMethods};
323 #[cfg(feature = "app-calculatorcommand")]
324 pub use crate::app::calculatorcommand::ICalculatorCommandMethods;
325 #[cfg(feature = "system-object")]
326 pub use crate::system::object::IObjectMethods;
327 pub use crate::{app::calculatorcommand::ICalculatorCommand, system::object::IObject};
328}