Skip to main content

engage/generated/moon_sharp/interpreter/
dynamicexpression.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-dynamicexpression-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/dynamicexpression/DynamicExpression.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter", name = "DynamicExpression")]
12    #[parent(crate::system::object::Object)]
13    pub struct DynamicExpression {
14        #[offset(16)]
15        #[rename(name = "m_Exp")]
16        pub m_exp: crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression,
17        #[offset(24)]
18        #[rename(name = "m_Constant")]
19        pub m_constant: crate::moon_sharp::interpreter::dynvalue::DynValue,
20        #[offset(32)]
21        #[rename(name = "ExpressionCode")]
22        pub expression_code: ::unity::Il2CppString,
23    }
24}
25
26#[cfg(feature = "moon_sharp-interpreter-dynamicexpression-types")]
27pub use __types::*;
28
29#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
30#[doc(hidden)]
31#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
32mod __DynamicExpression_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::script::Script as ::unity::IlType>::il_type(),
41                <::unity::Il2CppString as ::unity::IlType>::il_type(),
42                <crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression as ::unity::IlType>::il_type(),
43            ];
44            ::unity::lookup::method_info_on_class_with_signature(
45                <DynamicExpression as ::unity::ClassIdentity>::class(),
46                ".ctor",
47                3,
48                param_types,
49                false,
50            )
51        });
52        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
53            match &*METHOD {
54                ::core::result::Result::Ok(mi) => *mi,
55                ::core::result::Result::Err(e) => {
56                    panic!(
57                        "method lookup failed: {}
58::{}
59: {}
60",
61                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
62                        ".ctor",
63                        e
64                    )
65                },
66            }
67        }
68    }
69    #[doc(hidden)]
70    #[allow(non_snake_case)]
71    pub mod __lookup_ctor_2 {
72        use super::*;
73        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
74            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
75                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
76                <::unity::Il2CppString as ::unity::IlType>::il_type(),
77                <crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type(),
78            ];
79            ::unity::lookup::method_info_on_class_with_signature(
80                <DynamicExpression as ::unity::ClassIdentity>::class(),
81                ".ctor",
82                3,
83                param_types,
84                false,
85            )
86        });
87        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
88            match &*METHOD {
89                ::core::result::Result::Ok(mi) => *mi,
90                ::core::result::Result::Err(e) => {
91                    panic!(
92                        "method lookup failed: {}
93::{}
94: {}
95",
96                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
97                        ".ctor",
98                        e
99                    )
100                },
101            }
102        }
103    }
104    #[doc(hidden)]
105    #[allow(non_snake_case)]
106    pub mod __lookup_evaluate {
107        use super::*;
108        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
109            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
110                &[<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type()];
111            ::unity::lookup::method_info_on_class_with_signature(
112                <DynamicExpression as ::unity::ClassIdentity>::class(),
113                "Evaluate",
114                1,
115                param_types,
116                false,
117            )
118        });
119        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
120            match &*METHOD {
121                ::core::result::Result::Ok(mi) => *mi,
122                ::core::result::Result::Err(e) => {
123                    panic!(
124                        "method lookup failed: {}
125::{}
126: {}
127",
128                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
129                        "Evaluate",
130                        e
131                    )
132                },
133            }
134        }
135    }
136    #[doc(hidden)]
137    #[allow(non_snake_case)]
138    pub mod __lookup_find_symbol {
139        use super::*;
140        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
141            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
142                &[<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext as ::unity::IlType>::il_type()];
143            ::unity::lookup::method_info_on_class_with_signature(
144                <DynamicExpression as ::unity::ClassIdentity>::class(),
145                "FindSymbol",
146                1,
147                param_types,
148                false,
149            )
150        });
151        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152            match &*METHOD {
153                ::core::result::Result::Ok(mi) => *mi,
154                ::core::result::Result::Err(e) => {
155                    panic!(
156                        "method lookup failed: {}
157::{}
158: {}
159",
160                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
161                        "FindSymbol",
162                        e
163                    )
164                },
165            }
166        }
167    }
168    #[doc(hidden)]
169    #[allow(non_snake_case)]
170    pub mod __lookup_set_owner_script {
171        use super::*;
172        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
173            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
174                &[<crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type()];
175            ::unity::lookup::method_info_on_class_with_signature(
176                <DynamicExpression as ::unity::ClassIdentity>::class(),
177                "set_OwnerScript",
178                1,
179                param_types,
180                false,
181            )
182        });
183        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184            match &*METHOD {
185                ::core::result::Result::Ok(mi) => *mi,
186                ::core::result::Result::Err(e) => {
187                    panic!(
188                        "method lookup failed: {}
189::{}
190: {}
191",
192                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
193                        "set_OwnerScript",
194                        e
195                    )
196                },
197            }
198        }
199    }
200    #[doc(hidden)]
201    #[allow(non_snake_case)]
202    pub mod __lookup_is_constant {
203        use super::*;
204        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
205            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
206            ::unity::lookup::method_info_on_class_with_signature(
207                <DynamicExpression as ::unity::ClassIdentity>::class(),
208                "IsConstant",
209                0,
210                param_types,
211                false,
212            )
213        });
214        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
215            match &*METHOD {
216                ::core::result::Result::Ok(mi) => *mi,
217                ::core::result::Result::Err(e) => {
218                    panic!(
219                        "method lookup failed: {}
220::{}
221: {}
222",
223                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
224                        "IsConstant",
225                        e
226                    )
227                },
228            }
229        }
230    }
231}
232
233#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
234pub trait IDynamicExpressionMethods: IDynamicExpression {
235    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, ::unity::Il2CppString, crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression)` overload"]
236    fn ctor(
237        self,
238        s: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
239        str_expr: impl ::core::convert::Into<::unity::Il2CppString>,
240        expr: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression>,
241    ) -> () {
242        unsafe {
243            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
244            ::unity::il2cpp_call!(__DynamicExpression_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
245(DynamicExpression)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(s),(::unity::Il2CppString)::core::convert::Into::into(str_expr),(crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression)::core::convert::Into::into(expr))
246        }
247    }
248    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, ::unity::Il2CppString, crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
249    fn ctor_2(
250        self,
251        s: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
252        str_expr: impl ::core::convert::Into<::unity::Il2CppString>,
253        constant: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
254    ) -> () {
255        unsafe {
256            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
257            ::unity::il2cpp_call!(__DynamicExpression_unity_raw::__lookup_ctor_2::get_method_info().method_ptr,();
258(DynamicExpression)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(s),(::unity::Il2CppString)::core::convert::Into::into(str_expr),(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(constant))
259        }
260    }
261    #[doc = "`Evaluate(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)` overload"]
262    fn evaluate(
263        self,
264        context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
265    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
266        unsafe {
267            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
268            ::unity::il2cpp_call!(__DynamicExpression_unity_raw::__lookup_evaluate::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
269(DynamicExpression)__receiver,(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(context))
270        }
271    }
272    #[doc = "`FindSymbol(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)` overload"]
273    fn find_symbol(
274        self,
275        context: impl ::core::convert::Into<crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext>,
276    ) -> crate::moon_sharp::interpreter::symbolref::SymbolRef {
277        unsafe {
278            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
279            ::unity::il2cpp_call!(__DynamicExpression_unity_raw::__lookup_find_symbol::get_method_info().method_ptr,crate::moon_sharp::interpreter::symbolref::SymbolRef;
280(DynamicExpression)__receiver,(crate::moon_sharp::interpreter::scriptexecutioncontext::ScriptExecutionContext)::core::convert::Into::into(context))
281        }
282    }
283    #[doc = "`get_OwnerScript()` overload"]
284    fn get_owner_script(self) -> crate::moon_sharp::interpreter::script::Script {
285        unsafe {
286            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
287            {
288                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
289                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
290                    panic!(
291                        "unity: virtual slot {}
292 out of range (vtable len {}
293) on the runtime class behind {}
294 (method `{}
295`)",
296                        4usize,
297                        __vt.len(),
298                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
299                        "get_OwnerScript",
300                    )
301                });
302                let __inner: extern "C" fn(DynamicExpression, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
303                    ::core::mem::transmute(__vi.method_ptr);
304                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
305                __inner(__receiver, __mi)
306            }
307        }
308    }
309    #[doc = "`set_OwnerScript(crate::moon_sharp::interpreter::script::Script)` overload"]
310    fn set_owner_script(self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>) -> () {
311        unsafe {
312            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
313            ::unity::il2cpp_call!(__DynamicExpression_unity_raw::__lookup_set_owner_script::get_method_info().method_ptr,();
314(DynamicExpression)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(value))
315        }
316    }
317    #[doc = "`IsConstant()` overload"]
318    fn is_constant(self) -> bool {
319        unsafe {
320            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
321            ::unity::il2cpp_call!(__DynamicExpression_unity_raw::__lookup_is_constant::get_method_info().method_ptr,bool;
322(DynamicExpression)__receiver)
323        }
324    }
325    #[doc = "`GetHashCode()` overload"]
326    fn get_hash_code(self) -> i32 {
327        unsafe {
328            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
329            {
330                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
331                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
332                    panic!(
333                        "unity: virtual slot {}
334 out of range (vtable len {}
335) on the runtime class behind {}
336 (method `{}
337`)",
338                        2usize,
339                        __vt.len(),
340                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
341                        "GetHashCode",
342                    )
343                });
344                let __inner: extern "C" fn(DynamicExpression, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
345                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
346                __inner(__receiver, __mi)
347            }
348        }
349    }
350    #[doc = "`Equals(crate::system::object::Object)` overload"]
351    fn equals(self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
352        unsafe {
353            let __receiver = <DynamicExpression as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
354            {
355                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
356                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
357                    panic!(
358                        "unity: virtual slot {}
359 out of range (vtable len {}
360) on the runtime class behind {}
361 (method `{}
362`)",
363                        0usize,
364                        __vt.len(),
365                        <DynamicExpression as ::unity::ClassIdentity>::NAME,
366                        "Equals",
367                    )
368                });
369                let __inner: extern "C" fn(DynamicExpression, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
370                    ::core::mem::transmute(__vi.method_ptr);
371                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
372                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
373            }
374        }
375    }
376}
377
378#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
379impl<__T: IDynamicExpression> IDynamicExpressionMethods for __T {}
380
381#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
382impl DynamicExpression {
383    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
384        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
385    }
386
387    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
388        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
389    }
390
391    pub fn evaluate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
392        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
393    }
394
395    pub fn find_symbol_method_info() -> &'static ::unity::il2cpp::MethodInfo {
396        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
397    }
398
399    pub fn get_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
400        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
401    }
402
403    pub fn set_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
404        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
405    }
406
407    pub fn is_constant_method_info() -> &'static ::unity::il2cpp::MethodInfo {
408        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
409    }
410
411    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
412        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
413    }
414
415    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
416        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
417    }
418}
419
420#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
421impl DynamicExpression {
422    #[doc = "Direct (non-virtual) call to `DynamicExpression`'s own `get_OwnerScript`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
423    pub unsafe fn get_owner_script(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::moon_sharp::interpreter::script::Script {
424        let __mi = Self::get_owner_script_method_info();
425        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
426            ::core::mem::transmute(__mi.method_ptr);
427        __inner(this.into(), ::core::option::Option::None)
428    }
429
430    #[doc = "Direct (non-virtual) call to `DynamicExpression`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
431    pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
432        let __mi = Self::get_hash_code_method_info();
433        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
434        __inner(this.into(), ::core::option::Option::None)
435    }
436
437    #[doc = "Direct (non-virtual) call to `DynamicExpression`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
438    pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::system::object::Object) -> bool {
439        let __mi = Self::equals_method_info();
440        let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
441            ::core::mem::transmute(__mi.method_ptr);
442        __inner(this.into(), obj, ::core::option::Option::None)
443    }
444}
445
446#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
447impl DynamicExpression {
448    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, ::unity::Il2CppString, crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression)` — overload selector"]
449    pub fn new(
450        s: crate::moon_sharp::interpreter::script::Script,
451        str_expr: ::unity::Il2CppString,
452        expr: crate::moon_sharp::interpreter::tree::expressions::dynamicexprexpression::DynamicExprExpression,
453    ) -> Self {
454        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
455            panic!(
456                "{}
457::{}
458 failed to instantiate",
459                ::core::stringify!(DynamicExpression),
460                ::core::stringify!(new),
461            )
462        });
463        <Self as IDynamicExpressionMethods>::ctor(this, s, str_expr, expr);
464        this
465    }
466
467    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, ::unity::Il2CppString, crate::moon_sharp::interpreter::dynvalue::DynValue)` — overload selector"]
468    pub fn new_2(
469        s: crate::moon_sharp::interpreter::script::Script,
470        str_expr: ::unity::Il2CppString,
471        constant: crate::moon_sharp::interpreter::dynvalue::DynValue,
472    ) -> Self {
473        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
474            panic!(
475                "{}
476::{}
477 failed to instantiate",
478                ::core::stringify!(DynamicExpression),
479                ::core::stringify!(new_2),
480            )
481        });
482        <Self as IDynamicExpressionMethods>::ctor_2(this, s, str_expr, constant);
483        this
484    }
485}
486
487#[cfg(feature = "moon_sharp-interpreter-dynamicexpression")]
488#[doc(hidden)]
489pub mod prelude {
490    pub use super::{DynamicExpression, IDynamicExpression, IDynamicExpressionMethods};
491    pub use crate::system::object::IObject;
492    #[cfg(feature = "system-object")]
493    pub use crate::system::object::IObjectMethods;
494}