Skip to main content

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

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