Skip to main content

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

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement-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/functioncallstatement/FunctionCallStatement.md"))]
17    #[::unity::class(namespace = "MoonSharp.Interpreter.Tree.Statements", name = "FunctionCallStatement")]
18    #[parent(crate::moon_sharp::interpreter::tree::statement::Statement)]
19    pub struct FunctionCallStatement {
20        #[offset(32)]
21        #[rename(name = "m_FunctionCallExpression")]
22        pub m_function_call_expression: crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression,
23    }
24}
25
26#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement-types")]
27pub use __types::*;
28
29#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
30#[doc(hidden)]
31#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
32mod __FunctionCallStatement_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                <crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression as ::unity::IlType>::il_type(),
42            ];
43            ::unity::lookup::method_info_on_class_with_signature(
44                <FunctionCallStatement as ::unity::ClassIdentity>::class(),
45                ".ctor",
46                2,
47                param_types,
48                false,
49            )
50        });
51        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
52            match &*METHOD {
53                ::core::result::Result::Ok(mi) => *mi,
54                ::core::result::Result::Err(e) => {
55                    panic!(
56                        "method lookup failed: {}
57::{}
58: {}
59",
60                        <FunctionCallStatement as ::unity::ClassIdentity>::NAME,
61                        ".ctor",
62                        e
63                    )
64                },
65            }
66        }
67    }
68    #[doc(hidden)]
69    #[allow(non_snake_case)]
70    pub mod __lookup_remove_breakpoint_stop {
71        use super::*;
72        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
73            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
74                &[<crate::moon_sharp::interpreter::execution::vm::instruction::Instruction as ::unity::IlType>::il_type()];
75            ::unity::lookup::method_info_on_class_with_signature(
76                <FunctionCallStatement as ::unity::ClassIdentity>::class(),
77                "RemoveBreakpointStop",
78                1,
79                param_types,
80                false,
81            )
82        });
83        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
84            match &*METHOD {
85                ::core::result::Result::Ok(mi) => *mi,
86                ::core::result::Result::Err(e) => {
87                    panic!(
88                        "method lookup failed: {}
89::{}
90: {}
91",
92                        <FunctionCallStatement as ::unity::ClassIdentity>::NAME,
93                        "RemoveBreakpointStop",
94                        e
95                    )
96                },
97            }
98        }
99    }
100}
101
102#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
103pub trait IFunctionCallStatementMethods: IFunctionCallStatement {
104    #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression)` overload"]
105    fn ctor(
106        self,
107        lcontext: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext>,
108        function_call_expression: impl ::core::convert::Into<
109            crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression,
110        >,
111    ) -> () {
112        unsafe {
113            let __receiver = <FunctionCallStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114            ::unity::il2cpp_call!(__FunctionCallStatement_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
115(FunctionCallStatement)__receiver,(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext)::core::convert::Into::into(lcontext),(crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression)::core::convert::Into::into(function_call_expression))
116        }
117    }
118    #[doc = "`Compile(crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode)` overload"]
119    fn compile(self, bc: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode>) -> () {
120        unsafe {
121            let __receiver = <FunctionCallStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122            {
123                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
125                    panic!(
126                        "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131                        4usize,
132                        __vt.len(),
133                        <FunctionCallStatement as ::unity::ClassIdentity>::NAME,
134                        "Compile",
135                    )
136                });
137                let __inner: extern "C" fn(
138                    FunctionCallStatement,
139                    crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
140                    ::unity::OptionalMethod,
141                ) -> () = ::core::mem::transmute(__vi.method_ptr);
142                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
143                __inner(__receiver, ::core::convert::Into::into(bc), __mi)
144            }
145        }
146    }
147    #[doc = "`RemoveBreakpointStop(crate::moon_sharp::interpreter::execution::vm::instruction::Instruction)` overload"]
148    fn remove_breakpoint_stop(
149        self,
150        instruction: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::instruction::Instruction>,
151    ) -> () {
152        unsafe {
153            let __receiver = <FunctionCallStatement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
154            ::unity::il2cpp_call!(__FunctionCallStatement_unity_raw::__lookup_remove_breakpoint_stop::get_method_info().method_ptr,();
155(FunctionCallStatement)__receiver,(crate::moon_sharp::interpreter::execution::vm::instruction::Instruction)::core::convert::Into::into(instruction))
156        }
157    }
158}
159
160#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
161impl<__T: IFunctionCallStatement> IFunctionCallStatementMethods for __T {}
162
163#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
164impl FunctionCallStatement {
165    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
167    }
168
169    pub fn compile_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
171    }
172
173    pub fn remove_breakpoint_stop_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
175    }
176}
177
178#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
179impl FunctionCallStatement {
180    #[doc = "Direct (non-virtual) call to `FunctionCallStatement`'s own `Compile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
181    pub unsafe fn compile(
182        this: impl ::core::convert::Into<::unity::IlInstance>,
183        bc: crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
184    ) -> () {
185        let __mi = Self::compile_method_info();
186        let __inner: extern "C" fn(
187            ::unity::IlInstance,
188            crate::moon_sharp::interpreter::execution::vm::bytecode::ByteCode,
189            ::unity::OptionalMethod,
190        ) -> () = ::core::mem::transmute(__mi.method_ptr);
191        __inner(this.into(), bc, ::core::option::Option::None)
192    }
193}
194
195#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
196impl FunctionCallStatement {
197    #[doc = "`.ctor(crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext, crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression)` — overload selector"]
198    pub fn new(
199        lcontext: crate::moon_sharp::interpreter::execution::scriptloadingcontext::ScriptLoadingContext,
200        function_call_expression: crate::moon_sharp::interpreter::tree::expressions::functioncallexpression::FunctionCallExpression,
201    ) -> Self {
202        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
203            panic!(
204                "{}
205::{}
206 failed to instantiate",
207                ::core::stringify!(FunctionCallStatement),
208                ::core::stringify!(new),
209            )
210        });
211        <Self as IFunctionCallStatementMethods>::ctor(this, lcontext, function_call_expression);
212        this
213    }
214}
215
216#[cfg(feature = "moon_sharp-interpreter-tree-statements-functioncallstatement")]
217#[doc(hidden)]
218pub mod prelude {
219    pub use super::{FunctionCallStatement, IFunctionCallStatement, IFunctionCallStatementMethods};
220    #[cfg(feature = "moon_sharp-interpreter-tree-nodebase")]
221    pub use crate::moon_sharp::interpreter::tree::nodebase::INodeBaseMethods;
222    #[cfg(feature = "moon_sharp-interpreter-tree-statement")]
223    pub use crate::moon_sharp::interpreter::tree::statement::IStatementMethods;
224    #[cfg(feature = "system-object")]
225    pub use crate::system::object::IObjectMethods;
226    pub use crate::{
227        moon_sharp::interpreter::tree::{nodebase::INodeBase, statement::IStatement},
228        system::object::IObject,
229    };
230}