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