engage/generated/moon_sharp/interpreter/tree/expressions/
unaryoperatorexpression.rs1#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 moon_sharp::interpreter::tree::{
10 expression::{Expression, IExpression},
11 nodebase::{INodeBase, NodeBase},
12 },
13 system::object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/expressions/unaryoperatorexpression/UnaryOperatorExpression.md"))]
17 #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Expressions", name = "UnaryOperatorExpression")]
18 #[parent(crate::moon_sharp::interpreter::tree::expression::Expression)]
19 pub struct UnaryOperatorExpression {
20 #[offset(32)]
21 #[rename(name = "m_Exp")]
22 pub m_exp: crate::moon_sharp::interpreter::tree::expression::Expression,
23 #[offset(40)]
24 #[rename(name = "m_OpText")]
25 pub m_op_text: ::unity::Il2CppString,
26 }
27}
28
29#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression-types")]
30pub use __types::*;
31
32#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
33#[doc(hidden)]
34#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
35mod __UnaryOperatorExpression_unity_raw {
36 use super::*;
37 #[doc(hidden)]
38 #[allow(non_snake_case)]
39 pub mod __lookup_ctor {
40 use super::*;
41 static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
42 let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
43 <crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext as ::unity::IlType>::il_type(),
44 <crate::moon_sharp::interpreter::tree::expression::Expression as ::unity::IlType>::il_type(),
45 <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
46 ];
47 ::unity::lookup::method_info_on_class_with_signature(
48 <UnaryOperatorExpression as ::unity::ClassIdentity>::class(),
49 ".ctor",
50 3,
51 param_types,
52 false,
53 )
54 });
55 pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
56 match &*METHOD {
57 ::core::result::Result::Ok(mi) => *mi,
58 ::core::result::Result::Err(e) => {
59 panic!(
60 "method lookup failed: {}
61::{}
62: {}
63",
64 <UnaryOperatorExpression as ::unity::ClassIdentity>::NAME,
65 ".ctor",
66 e
67 )
68 },
69 }
70 }
71 }
72}
73
74#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
75pub trait IUnaryOperatorExpressionMethods: IUnaryOperatorExpression {
76 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::expression::Expression, crate::moon_sharp::interpreter::tree::token::Token)` overload"]
77 fn ctor(
78 self,
79 lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>,
80 sub_expression: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::expression::Expression>,
81 unary_op_token: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
82 ) -> () {
83 unsafe {
84 let __receiver =
85 <UnaryOperatorExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86 ::unity::il2cpp_call!(__UnaryOperatorExpression_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
87(UnaryOperatorExpression)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext),(crate::moon_sharp::interpreter::tree::expression::Expression)::core::convert::Into::into(sub_expression),(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(unary_op_token))
88 }
89 }
90 #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
91 fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
92 unsafe {
93 let __receiver =
94 <UnaryOperatorExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95 {
96 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
97 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
98 panic!(
99 "unity: virtual slot {}
100 out of range (vtable len {}
101) on the runtime class behind {}
102 (method `{}
103`)",
104 4usize,
105 __vt.len(),
106 <UnaryOperatorExpression as ::unity::ClassIdentity>::NAME,
107 "Compile",
108 )
109 });
110 let __inner: extern "C" fn(
111 UnaryOperatorExpression,
112 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
113 ::unity::OptionalMethod,
114 ) -> () = ::core::mem::transmute(__vi.method_ptr);
115 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
116 __inner(__receiver, ::core::convert::Into::into(bc), __mi)
117 }
118 }
119 }
120 #[doc = "`Eval(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)` overload"]
121 fn eval(
122 self,
123 context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
124 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
125 unsafe {
126 let __receiver =
127 <UnaryOperatorExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
128 {
129 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
130 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
131 panic!(
132 "unity: virtual slot {}
133 out of range (vtable len {}
134) on the runtime class behind {}
135 (method `{}
136`)",
137 6usize,
138 __vt.len(),
139 <UnaryOperatorExpression as ::unity::ClassIdentity>::NAME,
140 "Eval",
141 )
142 });
143 let __inner: extern "C" fn(
144 UnaryOperatorExpression,
145 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
146 ::unity::OptionalMethod,
147 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__vi.method_ptr);
148 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
149 __inner(__receiver, ::core::convert::Into::into(context), __mi)
150 }
151 }
152 }
153}
154
155#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
156impl<__T: IUnaryOperatorExpression> IUnaryOperatorExpressionMethods for __T {}
157
158#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
159impl UnaryOperatorExpression {
160 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
161 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
162 }
163
164 pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
165 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
166 }
167
168 pub fn eval_method_info() -> &'static ::unity::il2cpp::MethodInfo {
169 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
170 }
171}
172
173#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
174impl UnaryOperatorExpression {
175 #[doc = "Direct (non-virtual) call to `UnaryOperatorExpression`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
176 pub unsafe fn compile(
177 this: impl ::core::convert::Into<::unity::IlInstance>,
178 bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
179 ) -> () {
180 let __mi = Self::compile_method_info();
181 let __inner: extern "C" fn(
182 ::unity::IlInstance,
183 crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
184 ::unity::OptionalMethod,
185 ) -> () = ::core::mem::transmute(__mi.method_ptr);
186 __inner(this.into(), bc, ::core::option::Option::None)
187 }
188
189 #[doc = "Direct (non-virtual) call to `UnaryOperatorExpression`'s own `Eval`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
190 pub unsafe fn eval(
191 this: impl ::core::convert::Into<::unity::IlInstance>,
192 context: crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
193 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
194 let __mi = Self::eval_method_info();
195 let __inner: extern "C" fn(
196 ::unity::IlInstance,
197 crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext,
198 ::unity::OptionalMethod,
199 ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__mi.method_ptr);
200 __inner(this.into(), context, ::core::option::Option::None)
201 }
202}
203
204#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
205impl UnaryOperatorExpression {
206 #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::expression::Expression, crate::moon_sharp::interpreter::tree::token::Token)` — overload selector"]
207 pub fn new(
208 lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext,
209 sub_expression: crate::moon_sharp::interpreter::tree::expression::Expression,
210 unary_op_token: crate::moon_sharp::interpreter::tree::token::Token,
211 ) -> Self {
212 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
213 panic!(
214 "{}
215::{}
216 failed to instantiate",
217 ::core::stringify!(UnaryOperatorExpression),
218 ::core::stringify!(new),
219 )
220 });
221 <Self as IUnaryOperatorExpressionMethods>::ctor(this, lcontext, sub_expression, unary_op_token);
222 this
223 }
224}
225
226#[cfg(feature = "moon_sharp-interpreter-tree-expressions-unaryoperatorexpression")]
227#[doc(hidden)]
228pub mod prelude {
229 pub use super::{IUnaryOperatorExpression, IUnaryOperatorExpressionMethods, UnaryOperatorExpression};
230 #[cfg(feature = "moon_sharp-interpreter-tree-expression")]
231 pub use crate::moon_sharp::interpreter::tree::expression::IExpressionMethods;
232 #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
233 pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
234 #[cfg(feature = "system-object")]
235 pub use crate::system::object::IObjectMethods;
236 pub use crate::{
237 moon_sharp::interpreter::tree::{expression::IExpression, nodebase::INodeBase},
238 system::object::IObject,
239 };
240}