Skip to main content

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

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