Skip to main content

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

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