Skip to main content

engage/generated/app/
variablecommand.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-variablecommand-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/variablecommand/VariableCommand.md"))]
14    #[::unity::class(namespace = "App", name = "VariableCommand")]
15    #[parent(crate::app::calculatorcommand::CalculatorCommand)]
16    pub struct VariableCommand {
17        #[offset(24)]
18        #[rename(name = "m_Name")]
19        pub m_name: ::unity::Il2CppString,
20        #[offset(32)]
21        #[rename(name = "m_Value")]
22        pub m_value: f32,
23    }
24}
25
26#[cfg(feature = "app-variablecommand-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-variablecommand")]
30pub trait IVariableCommandMethods: IVariableCommand {
31    #[doc = "`.ctor(::unity::Il2CppString, f32)` overload"]
32    fn ctor(self, name: impl ::core::convert::Into<::unity::Il2CppString>, value: impl ::core::convert::Into<f32>) -> () {
33        unsafe {
34            let __receiver = <VariableCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            ::unity::il2cpp_call!((::unity::module_base()+0x26a5eb0usize)as*mut u8,();
36(VariableCommand)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(f32)::core::convert::Into::into(value))
37        }
38    }
39    #[doc = "`get_Name()` overload"]
40    fn get_name(self) -> ::unity::Il2CppString {
41        unsafe {
42            let __receiver = <VariableCommand 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                        <VariableCommand as ::unity::ClassIdentity>::NAME,
55                        "get_Name",
56                    )
57                });
58                let __inner: extern "C" fn(VariableCommand, ::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()` overload"]
66    fn get(self) -> f32 {
67        unsafe {
68            let __receiver = <VariableCommand 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(9usize).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                        9usize,
79                        __vt.len(),
80                        <VariableCommand as ::unity::ClassIdentity>::NAME,
81                        "Get",
82                    )
83                });
84                let __inner: extern "C" fn(VariableCommand, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__vi.method_ptr);
85                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
86                __inner(__receiver, __mi)
87            }
88        }
89    }
90    #[doc = "`Set(f32)` overload"]
91    fn set(self, value: impl ::core::convert::Into<f32>) -> () {
92        unsafe {
93            let __receiver = <VariableCommand as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
94            {
95                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
96                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
97                    panic!(
98                        "unity: virtual slot {}
99 out of range (vtable len {}
100) on the runtime class behind {}
101 (method `{}
102`)",
103                        12usize,
104                        __vt.len(),
105                        <VariableCommand as ::unity::ClassIdentity>::NAME,
106                        "Set",
107                    )
108                });
109                let __inner: extern "C" fn(VariableCommand, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
110                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
111                __inner(__receiver, ::core::convert::Into::into(value), __mi)
112            }
113        }
114    }
115}
116
117#[cfg(feature = "app-variablecommand")]
118impl<__T: IVariableCommand> IVariableCommandMethods for __T {}
119
120#[cfg(feature = "app-variablecommand")]
121impl VariableCommand {
122    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
123        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
124    }
125
126    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
128    }
129
130    pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
131        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
132    }
133
134    pub fn set_method_info() -> &'static ::unity::il2cpp::MethodInfo {
135        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
136    }
137}
138
139#[cfg(feature = "app-variablecommand")]
140impl VariableCommand {
141    #[doc = "Direct (non-virtual) call to `VariableCommand`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
142    pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
143        let __mi = Self::get_name_method_info();
144        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
145        __inner(this.into(), ::core::option::Option::None)
146    }
147
148    #[doc = "Direct (non-virtual) call to `VariableCommand`'s own `Get`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
149    pub unsafe fn get(this: impl ::core::convert::Into<::unity::IlInstance>) -> f32 {
150        let __mi = Self::get_method_info();
151        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__mi.method_ptr);
152        __inner(this.into(), ::core::option::Option::None)
153    }
154
155    #[doc = "Direct (non-virtual) call to `VariableCommand`'s own `Set`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
156    pub unsafe fn set(this: impl ::core::convert::Into<::unity::IlInstance>, value: f32) -> () {
157        let __mi = Self::set_method_info();
158        let __inner: extern "C" fn(::unity::IlInstance, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
159        __inner(this.into(), value, ::core::option::Option::None)
160    }
161}
162
163#[cfg(feature = "app-variablecommand")]
164impl VariableCommand {
165    #[doc = "`.ctor(::unity::Il2CppString, f32)` — overload selector"]
166    pub fn new(name: ::unity::Il2CppString, value: f32) -> Self {
167        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
168            panic!(
169                "{}
170::{}
171 failed to instantiate",
172                ::core::stringify!(VariableCommand),
173                ::core::stringify!(new),
174            )
175        });
176        <Self as IVariableCommandMethods>::ctor(this, name, value);
177        this
178    }
179}
180
181#[cfg(feature = "app-variablecommand")]
182#[doc(hidden)]
183pub mod prelude {
184    pub use super::{IVariableCommand, IVariableCommandMethods, VariableCommand};
185    #[cfg(feature = "app-calculatorcommand")]
186    pub use crate::app::calculatorcommand::ICalculatorCommandMethods;
187    #[cfg(feature = "system-object")]
188    pub use crate::system::object::IObjectMethods;
189    pub use crate::{app::calculatorcommand::ICalculatorCommand, system::object::IObject};
190}