Skip to main content

engage/generated/moon_sharp/interpreter/tree/expressions/
dynamicexprexpression.rs

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