Skip to main content

engage/generated/moon_sharp/interpreter/repl/
replinterpreter.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/repl/replinterpreter/ReplInterpreter.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.REPL", name = "ReplInterpreter")]
12    #[parent(crate::system::object::Object)]
13    pub struct ReplInterpreter {
14        #[offset(16)]
15        #[rename(name = "m_Script")]
16        pub m_script: crate::moon_sharp::interpreter::script::Script,
17        #[offset(24)]
18        #[rename(name = "m_CurrentCommand")]
19        pub m_current_command: ::unity::Il2CppString,
20    }
21}
22
23#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter-types")]
24pub use __types::*;
25
26#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
27#[doc(hidden)]
28#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
29mod __ReplInterpreter_unity_raw {
30    use super::*;
31    #[doc(hidden)]
32    #[allow(non_snake_case)]
33    pub mod __lookup_ctor {
34        use super::*;
35        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
36            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
37                &[<crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type()];
38            ::unity::lookup::method_info_on_class_with_signature(<ReplInterpreter as ::unity::ClassIdentity>::class(), ".ctor", 1, param_types, false)
39        });
40        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
41            match &*METHOD {
42                ::core::result::Result::Ok(mi) => *mi,
43                ::core::result::Result::Err(e) => {
44                    panic!(
45                        "method lookup failed: {}
46::{}
47: {}
48",
49                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
50                        ".ctor",
51                        e
52                    )
53                },
54            }
55        }
56    }
57    #[doc(hidden)]
58    #[allow(non_snake_case)]
59    pub mod __lookup_get_handle_dynamic_exprs {
60        use super::*;
61        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
62            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
63            ::unity::lookup::method_info_on_class_with_signature(
64                <ReplInterpreter as ::unity::ClassIdentity>::class(),
65                "get_HandleDynamicExprs",
66                0,
67                param_types,
68                false,
69            )
70        });
71        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
72            match &*METHOD {
73                ::core::result::Result::Ok(mi) => *mi,
74                ::core::result::Result::Err(e) => {
75                    panic!(
76                        "method lookup failed: {}
77::{}
78: {}
79",
80                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
81                        "get_HandleDynamicExprs",
82                        e
83                    )
84                },
85            }
86        }
87    }
88    #[doc(hidden)]
89    #[allow(non_snake_case)]
90    pub mod __lookup_set_handle_dynamic_exprs {
91        use super::*;
92        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
93            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<bool as ::unity::IlType>::il_type()];
94            ::unity::lookup::method_info_on_class_with_signature(
95                <ReplInterpreter as ::unity::ClassIdentity>::class(),
96                "set_HandleDynamicExprs",
97                1,
98                param_types,
99                false,
100            )
101        });
102        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
103            match &*METHOD {
104                ::core::result::Result::Ok(mi) => *mi,
105                ::core::result::Result::Err(e) => {
106                    panic!(
107                        "method lookup failed: {}
108::{}
109: {}
110",
111                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
112                        "set_HandleDynamicExprs",
113                        e
114                    )
115                },
116            }
117        }
118    }
119    #[doc(hidden)]
120    #[allow(non_snake_case)]
121    pub mod __lookup_get_handle_classic_exprs_syntax {
122        use super::*;
123        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
124            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
125            ::unity::lookup::method_info_on_class_with_signature(
126                <ReplInterpreter as ::unity::ClassIdentity>::class(),
127                "get_HandleClassicExprsSyntax",
128                0,
129                param_types,
130                false,
131            )
132        });
133        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
134            match &*METHOD {
135                ::core::result::Result::Ok(mi) => *mi,
136                ::core::result::Result::Err(e) => {
137                    panic!(
138                        "method lookup failed: {}
139::{}
140: {}
141",
142                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
143                        "get_HandleClassicExprsSyntax",
144                        e
145                    )
146                },
147            }
148        }
149    }
150    #[doc(hidden)]
151    #[allow(non_snake_case)]
152    pub mod __lookup_set_handle_classic_exprs_syntax {
153        use super::*;
154        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
155            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<bool as ::unity::IlType>::il_type()];
156            ::unity::lookup::method_info_on_class_with_signature(
157                <ReplInterpreter as ::unity::ClassIdentity>::class(),
158                "set_HandleClassicExprsSyntax",
159                1,
160                param_types,
161                false,
162            )
163        });
164        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
165            match &*METHOD {
166                ::core::result::Result::Ok(mi) => *mi,
167                ::core::result::Result::Err(e) => {
168                    panic!(
169                        "method lookup failed: {}
170::{}
171: {}
172",
173                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
174                        "set_HandleClassicExprsSyntax",
175                        e
176                    )
177                },
178            }
179        }
180    }
181}
182
183#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
184pub trait IReplInterpreterMethods: IReplInterpreter {
185    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script)` overload"]
186    fn ctor(self, script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>) -> () {
187        unsafe {
188            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
189            ::unity::il2cpp_call!(__ReplInterpreter_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
190(ReplInterpreter)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script))
191        }
192    }
193    #[doc = "`get_HandleDynamicExprs()` overload"]
194    fn get_handle_dynamic_exprs(self) -> bool {
195        unsafe {
196            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
197            ::unity::il2cpp_call!(__ReplInterpreter_unity_raw::__lookup_get_handle_dynamic_exprs::get_method_info().method_ptr,bool;
198(ReplInterpreter)__receiver)
199        }
200    }
201    #[doc = "`set_HandleDynamicExprs(bool)` overload"]
202    fn set_handle_dynamic_exprs(self, value: impl ::core::convert::Into<bool>) -> () {
203        unsafe {
204            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
205            ::unity::il2cpp_call!(__ReplInterpreter_unity_raw::__lookup_set_handle_dynamic_exprs::get_method_info().method_ptr,();
206(ReplInterpreter)__receiver,(bool)::core::convert::Into::into(value))
207        }
208    }
209    #[doc = "`get_HandleClassicExprsSyntax()` overload"]
210    fn get_handle_classic_exprs_syntax(self) -> bool {
211        unsafe {
212            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
213            ::unity::il2cpp_call!(__ReplInterpreter_unity_raw::__lookup_get_handle_classic_exprs_syntax::get_method_info().method_ptr,bool;
214(ReplInterpreter)__receiver)
215        }
216    }
217    #[doc = "`set_HandleClassicExprsSyntax(bool)` overload"]
218    fn set_handle_classic_exprs_syntax(self, value: impl ::core::convert::Into<bool>) -> () {
219        unsafe {
220            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
221            ::unity::il2cpp_call!(__ReplInterpreter_unity_raw::__lookup_set_handle_classic_exprs_syntax::get_method_info().method_ptr,();
222(ReplInterpreter)__receiver,(bool)::core::convert::Into::into(value))
223        }
224    }
225    #[doc = "`get_HasPendingCommand()` overload"]
226    fn get_has_pending_command(self) -> bool {
227        unsafe {
228            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
229            {
230                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
231                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
232                    panic!(
233                        "unity: virtual slot {}
234 out of range (vtable len {}
235) on the runtime class behind {}
236 (method `{}
237`)",
238                        4usize,
239                        __vt.len(),
240                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
241                        "get_HasPendingCommand",
242                    )
243                });
244                let __inner: extern "C" fn(ReplInterpreter, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
245                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
246                __inner(__receiver, __mi)
247            }
248        }
249    }
250    #[doc = "`get_CurrentPendingCommand()` overload"]
251    fn get_current_pending_command(self) -> ::unity::Il2CppString {
252        unsafe {
253            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
254            {
255                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
256                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
257                    panic!(
258                        "unity: virtual slot {}
259 out of range (vtable len {}
260) on the runtime class behind {}
261 (method `{}
262`)",
263                        5usize,
264                        __vt.len(),
265                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
266                        "get_CurrentPendingCommand",
267                    )
268                });
269                let __inner: extern "C" fn(ReplInterpreter, ::unity::OptionalMethod) -> ::unity::Il2CppString =
270                    ::core::mem::transmute(__vi.method_ptr);
271                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
272                __inner(__receiver, __mi)
273            }
274        }
275    }
276    #[doc = "`get_ClassicPrompt()` overload"]
277    fn get_classic_prompt(self) -> ::unity::Il2CppString {
278        unsafe {
279            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
280            {
281                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
282                let __vi = *__vt.get(6usize).unwrap_or_else(|| {
283                    panic!(
284                        "unity: virtual slot {}
285 out of range (vtable len {}
286) on the runtime class behind {}
287 (method `{}
288`)",
289                        6usize,
290                        __vt.len(),
291                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
292                        "get_ClassicPrompt",
293                    )
294                });
295                let __inner: extern "C" fn(ReplInterpreter, ::unity::OptionalMethod) -> ::unity::Il2CppString =
296                    ::core::mem::transmute(__vi.method_ptr);
297                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
298                __inner(__receiver, __mi)
299            }
300        }
301    }
302    #[doc = "`Evaluate(::unity::Il2CppString)` overload"]
303    fn evaluate(self, input: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
304        unsafe {
305            let __receiver = <ReplInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
306            {
307                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
308                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
309                    panic!(
310                        "unity: virtual slot {}
311 out of range (vtable len {}
312) on the runtime class behind {}
313 (method `{}
314`)",
315                        7usize,
316                        __vt.len(),
317                        <ReplInterpreter as ::unity::ClassIdentity>::NAME,
318                        "Evaluate",
319                    )
320                });
321                let __inner: extern "C" fn(
322                    ReplInterpreter,
323                    ::unity::Il2CppString,
324                    ::unity::OptionalMethod,
325                ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__vi.method_ptr);
326                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
327                __inner(__receiver, ::core::convert::Into::into(input), __mi)
328            }
329        }
330    }
331}
332
333#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
334impl<__T: IReplInterpreter> IReplInterpreterMethods for __T {}
335
336#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
337impl ReplInterpreter {
338    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
339        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
340    }
341
342    pub fn get_handle_dynamic_exprs_method_info() -> &'static ::unity::il2cpp::MethodInfo {
343        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
344    }
345
346    pub fn set_handle_dynamic_exprs_method_info() -> &'static ::unity::il2cpp::MethodInfo {
347        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
348    }
349
350    pub fn get_handle_classic_exprs_syntax_method_info() -> &'static ::unity::il2cpp::MethodInfo {
351        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
352    }
353
354    pub fn set_handle_classic_exprs_syntax_method_info() -> &'static ::unity::il2cpp::MethodInfo {
355        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
356    }
357
358    pub fn get_has_pending_command_method_info() -> &'static ::unity::il2cpp::MethodInfo {
359        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
360    }
361
362    pub fn get_current_pending_command_method_info() -> &'static ::unity::il2cpp::MethodInfo {
363        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
364    }
365
366    pub fn get_classic_prompt_method_info() -> &'static ::unity::il2cpp::MethodInfo {
367        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
368    }
369
370    pub fn evaluate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
371        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
372    }
373}
374
375#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
376impl ReplInterpreter {
377    #[doc = "Direct (non-virtual) call to `ReplInterpreter`'s own `get_HasPendingCommand`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
378    pub unsafe fn get_has_pending_command(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
379        let __mi = Self::get_has_pending_command_method_info();
380        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
381        __inner(this.into(), ::core::option::Option::None)
382    }
383
384    #[doc = "Direct (non-virtual) call to `ReplInterpreter`'s own `get_CurrentPendingCommand`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
385    pub unsafe fn get_current_pending_command(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
386        let __mi = Self::get_current_pending_command_method_info();
387        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
388        __inner(this.into(), ::core::option::Option::None)
389    }
390
391    #[doc = "Direct (non-virtual) call to `ReplInterpreter`'s own `get_ClassicPrompt`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
392    pub unsafe fn get_classic_prompt(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
393        let __mi = Self::get_classic_prompt_method_info();
394        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
395        __inner(this.into(), ::core::option::Option::None)
396    }
397
398    #[doc = "Direct (non-virtual) call to `ReplInterpreter`'s own `Evaluate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
399    pub unsafe fn evaluate(
400        this: impl ::core::convert::Into<::unity::IlInstance>,
401        input: ::unity::Il2CppString,
402    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
403        let __mi = Self::evaluate_method_info();
404        let __inner: extern "C" fn(
405            ::unity::IlInstance,
406            ::unity::Il2CppString,
407            ::unity::OptionalMethod,
408        ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__mi.method_ptr);
409        __inner(this.into(), input, ::core::option::Option::None)
410    }
411}
412
413#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
414impl ReplInterpreter {
415    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script)` — overload selector"]
416    pub fn new(script: crate::moon_sharp::interpreter::script::Script) -> Self {
417        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
418            panic!(
419                "{}
420::{}
421 failed to instantiate",
422                ::core::stringify!(ReplInterpreter),
423                ::core::stringify!(new),
424            )
425        });
426        <Self as IReplInterpreterMethods>::ctor(this, script);
427        this
428    }
429}
430
431#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
432#[doc(hidden)]
433pub mod prelude {
434    pub use super::{IReplInterpreter, IReplInterpreterMethods, ReplInterpreter};
435    pub use crate::system::object::IObject;
436    #[cfg(feature = "system-object")]
437    pub use crate::system::object::IObjectMethods;
438}