Skip to main content

engage/generated/moon_sharp/interpreter/tree/statements/
foreachloopstatement.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        moon_sharp::interpreter::tree::{
10            nodebase::{INodeBase, NodeBase},
11            statement::{IStatement, Statement},
12        },
13        system::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/tree/statements/foreachloopstatement/ForEachLoopStatement.md"))]
17    #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Statements", name = "ForEachLoopStatement")]
18    #[parent(crate::moon_sharp::interpreter::tree::statement::Statement)]
19    pub struct ForEachLoopStatement {
20        #[offset(32)]
21        #[rename(name = "m_StackFrame")]
22        pub m_stack_frame: crate::moon_sharp::interpreter::execution::runtimescopeblock::RuntimeScopeBlock,
23        #[offset(40)]
24        #[rename(name = "m_Names")]
25        pub m_names: ::unity::Array<crate::moon_sharp::interpreter::symbolref::SymbolRef>,
26        #[offset(48)]
27        #[rename(name = "m_NameExps")]
28        pub m_name_exps: ::unity::Array<crate::moon_sharp::interpreter::tree::ivariable::IVariable>,
29        #[offset(56)]
30        #[rename(name = "m_RValues")]
31        pub m_r_values: crate::moon_sharp::interpreter::tree::expression::Expression,
32        #[offset(64)]
33        #[rename(name = "m_Block")]
34        pub m_block: crate::moon_sharp::interpreter::tree::statement::Statement,
35        #[offset(72)]
36        #[rename(name = "m_RefFor")]
37        pub m_ref_for: crate::moon_sharp::interpreter::debugging::sourceref::SourceRef,
38        #[offset(80)]
39        #[rename(name = "m_RefEnd")]
40        pub m_ref_end: crate::moon_sharp::interpreter::debugging::sourceref::SourceRef,
41    }
42}
43
44#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement-types")]
45pub use __types::*;
46
47#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
48#[doc(hidden)]
49#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
50mod __ForEachLoopStatement_unity_raw {
51    use super::*;
52    #[doc(hidden)]
53    #[allow(non_snake_case)]
54    pub mod __lookup_ctor {
55        use super::*;
56        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
57            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
58                <crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext as ::unity::IlType>::il_type(),
59                <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
60                <crate::moon_sharp::interpreter::tree::token::Token as ::unity::IlType>::il_type(),
61            ];
62            ::unity::lookup::method_info_on_class_with_signature(
63                <ForEachLoopStatement as ::unity::ClassIdentity>::class(),
64                ".ctor",
65                3,
66                param_types,
67                false,
68            )
69        });
70        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
71            match &*METHOD {
72                ::core::result::Result::Ok(mi) => *mi,
73                ::core::result::Result::Err(e) => {
74                    panic!(
75                        "method lookup failed: {}
76::{}
77: {}
78",
79                        <ForEachLoopStatement as ::unity::ClassIdentity>::NAME,
80                        ".ctor",
81                        e
82                    )
83                },
84            }
85        }
86    }
87}
88
89#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
90pub trait IForEachLoopStatementMethods: IForEachLoopStatement {
91    #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::token::Token, crate::moon_sharp::interpreter::tree::token::Token)` overload"]
92    fn ctor(
93        self,
94        lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>,
95        first_name_token: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
96        for_token: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::token::Token>,
97    ) -> () {
98        unsafe {
99            let __receiver = <ForEachLoopStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100            ::unity::il2cpp_call!(__ForEachLoopStatement_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
101(ForEachLoopStatement)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext),(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(first_name_token),(crate::moon_sharp::interpreter::tree::token::Token)::core::convert::Into::into(for_token))
102        }
103    }
104    #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
105    fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
106        unsafe {
107            let __receiver = <ForEachLoopStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            {
109                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
110                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
111                    panic!(
112                        "unity: virtual slot {}
113 out of range (vtable len {}
114) on the runtime class behind {}
115 (method `{}
116`)",
117                        4usize,
118                        __vt.len(),
119                        <ForEachLoopStatement as ::unity::ClassIdentity>::NAME,
120                        "Compile",
121                    )
122                });
123                let __inner: extern "C" fn(
124                    ForEachLoopStatement,
125                    crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
126                    ::unity::OptionalMethod,
127                ) -> () = ::core::mem::transmute(__vi.method_ptr);
128                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
129                __inner(__receiver, ::core::convert::Into::into(bc), __mi)
130            }
131        }
132    }
133}
134
135#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
136impl<__T: IForEachLoopStatement> IForEachLoopStatementMethods for __T {}
137
138#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
139impl ForEachLoopStatement {
140    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
142    }
143
144    pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
145        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
146    }
147}
148
149#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
150impl ForEachLoopStatement {
151    #[doc = "Direct (non-virtual) call to `ForEachLoopStatement`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
152    pub unsafe fn compile(
153        this: impl ::core::convert::Into<::unity::IlInstance>,
154        bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
155    ) -> () {
156        let __mi = Self::compile_method_info();
157        let __inner: extern "C" fn(
158            ::unity::IlInstance,
159            crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
160            ::unity::OptionalMethod,
161        ) -> () = ::core::mem::transmute(__mi.method_ptr);
162        __inner(this.into(), bc, ::core::option::Option::None)
163    }
164}
165
166#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
167impl ForEachLoopStatement {
168    #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::token::Token, crate::moon_sharp::interpreter::tree::token::Token)` — overload selector"]
169    pub fn new(
170        lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext,
171        first_name_token: crate::moon_sharp::interpreter::tree::token::Token,
172        for_token: crate::moon_sharp::interpreter::tree::token::Token,
173    ) -> Self {
174        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
175            panic!(
176                "{}
177::{}
178 failed to instantiate",
179                ::core::stringify!(ForEachLoopStatement),
180                ::core::stringify!(new),
181            )
182        });
183        <Self as IForEachLoopStatementMethods>::ctor(this, lcontext, first_name_token, for_token);
184        this
185    }
186}
187
188#[cfg(feature = "moon_sharp-interpreter-tree-statements-foreachloopstatement")]
189#[doc(hidden)]
190pub mod prelude {
191    pub use super::{ForEachLoopStatement, IForEachLoopStatement, IForEachLoopStatementMethods};
192    #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
193    pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
194    #[cfg(feature = "moon_sharp-interpreter-tree-statement")]
195    pub use crate::moon_sharp::interpreter::tree::statement::IStatementMethods;
196    #[cfg(feature = "system-object")]
197    pub use crate::system::object::IObjectMethods;
198    pub use crate::{
199        moon_sharp::interpreter::tree::{nodebase::INodeBase, statement::IStatement},
200        system::object::IObject,
201    };
202}