Skip to main content

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

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