Skip to main content

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

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