Skip to main content

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

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        moon_sharp::interpreter::repl::replinterpreter::{IReplInterpreter, ReplInterpreter},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/repl/replhistoryinterpreter/ReplHistoryInterpreter.md"))]
14    #[::unity::class(namespace = "MoonSharp.Interpreter.REPL", name = "ReplHistoryInterpreter")]
15    #[parent(crate::moon_sharp::interpreter::repl::replinterpreter::ReplInterpreter)]
16    pub struct ReplHistoryInterpreter {
17        #[offset(40)]
18        #[rename(name = "m_History")]
19        pub m_history: ::unity::Array<::unity::Il2CppString>,
20        #[offset(48)]
21        #[rename(name = "m_Last")]
22        pub m_last: i32,
23        #[offset(52)]
24        #[rename(name = "m_Navi")]
25        pub m_navi: i32,
26    }
27}
28
29#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter-types")]
30pub use __types::*;
31
32#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
33#[doc(hidden)]
34#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
35mod __ReplHistoryInterpreter_unity_raw {
36    use super::*;
37    #[doc(hidden)]
38    #[allow(non_snake_case)]
39    pub mod __lookup_ctor {
40        use super::*;
41        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
42            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
43                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
44                <i32 as ::unity::IlType>::il_type(),
45            ];
46            ::unity::lookup::method_info_on_class_with_signature(
47                <ReplHistoryInterpreter as ::unity::ClassIdentity>::class(),
48                ".ctor",
49                2,
50                param_types,
51                false,
52            )
53        });
54        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
55            match &*METHOD {
56                ::core::result::Result::Ok(mi) => *mi,
57                ::core::result::Result::Err(e) => {
58                    panic!(
59                        "method lookup failed: {}
60::{}
61: {}
62",
63                        <ReplHistoryInterpreter as ::unity::ClassIdentity>::NAME,
64                        ".ctor",
65                        e
66                    )
67                },
68            }
69        }
70    }
71    #[doc(hidden)]
72    #[allow(non_snake_case)]
73    pub mod __lookup_history_prev {
74        use super::*;
75        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
76            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
77            ::unity::lookup::method_info_on_class_with_signature(
78                <ReplHistoryInterpreter as ::unity::ClassIdentity>::class(),
79                "HistoryPrev",
80                0,
81                param_types,
82                false,
83            )
84        });
85        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
86            match &*METHOD {
87                ::core::result::Result::Ok(mi) => *mi,
88                ::core::result::Result::Err(e) => {
89                    panic!(
90                        "method lookup failed: {}
91::{}
92: {}
93",
94                        <ReplHistoryInterpreter as ::unity::ClassIdentity>::NAME,
95                        "HistoryPrev",
96                        e
97                    )
98                },
99            }
100        }
101    }
102    #[doc(hidden)]
103    #[allow(non_snake_case)]
104    pub mod __lookup_history_next {
105        use super::*;
106        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
107            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
108            ::unity::lookup::method_info_on_class_with_signature(
109                <ReplHistoryInterpreter as ::unity::ClassIdentity>::class(),
110                "HistoryNext",
111                0,
112                param_types,
113                false,
114            )
115        });
116        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
117            match &*METHOD {
118                ::core::result::Result::Ok(mi) => *mi,
119                ::core::result::Result::Err(e) => {
120                    panic!(
121                        "method lookup failed: {}
122::{}
123: {}
124",
125                        <ReplHistoryInterpreter as ::unity::ClassIdentity>::NAME,
126                        "HistoryNext",
127                        e
128                    )
129                },
130            }
131        }
132    }
133}
134
135#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
136pub trait IReplHistoryInterpreterMethods: IReplHistoryInterpreter {
137    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, i32)` overload"]
138    fn ctor(
139        self,
140        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
141        history_size: impl ::core::convert::Into<i32>,
142    ) -> () {
143        unsafe {
144            let __receiver =
145                <ReplHistoryInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146            ::unity::il2cpp_call!(__ReplHistoryInterpreter_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
147(ReplHistoryInterpreter)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(i32)::core::convert::Into::into(history_size))
148        }
149    }
150    #[doc = "`Evaluate(::unity::Il2CppString)` overload"]
151    fn evaluate(self, input: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
152        unsafe {
153            let __receiver =
154                <ReplHistoryInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
155            {
156                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
157                let __vi = *__vt.get(7usize).unwrap_or_else(|| {
158                    panic!(
159                        "unity: virtual slot {}
160 out of range (vtable len {}
161) on the runtime class behind {}
162 (method `{}
163`)",
164                        7usize,
165                        __vt.len(),
166                        <ReplHistoryInterpreter as ::unity::ClassIdentity>::NAME,
167                        "Evaluate",
168                    )
169                });
170                let __inner: extern "C" fn(
171                    ReplHistoryInterpreter,
172                    ::unity::Il2CppString,
173                    ::unity::OptionalMethod,
174                ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__vi.method_ptr);
175                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
176                __inner(__receiver, ::core::convert::Into::into(input), __mi)
177            }
178        }
179    }
180    #[doc = "`HistoryPrev()` overload"]
181    fn history_prev(self) -> ::unity::Il2CppString {
182        unsafe {
183            let __receiver =
184                <ReplHistoryInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
185            ::unity::il2cpp_call!(__ReplHistoryInterpreter_unity_raw::__lookup_history_prev::get_method_info().method_ptr, ::unity::Il2CppString;
186(ReplHistoryInterpreter)__receiver)
187        }
188    }
189    #[doc = "`HistoryNext()` overload"]
190    fn history_next(self) -> ::unity::Il2CppString {
191        unsafe {
192            let __receiver =
193                <ReplHistoryInterpreter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
194            ::unity::il2cpp_call!(__ReplHistoryInterpreter_unity_raw::__lookup_history_next::get_method_info().method_ptr, ::unity::Il2CppString;
195(ReplHistoryInterpreter)__receiver)
196        }
197    }
198}
199
200#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
201impl<__T: IReplHistoryInterpreter> IReplHistoryInterpreterMethods for __T {}
202
203#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
204impl ReplHistoryInterpreter {
205    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
207    }
208
209    pub fn evaluate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
211    }
212
213    pub fn history_prev_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
215    }
216
217    pub fn history_next_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
219    }
220}
221
222#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
223impl ReplHistoryInterpreter {
224    #[doc = "Direct (non-virtual) call to `ReplHistoryInterpreter`'s own `Evaluate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
225    pub unsafe fn evaluate(
226        this: impl ::core::convert::Into<::unity::IlInstance>,
227        input: ::unity::Il2CppString,
228    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
229        let __mi = Self::evaluate_method_info();
230        let __inner: extern "C" fn(
231            ::unity::IlInstance,
232            ::unity::Il2CppString,
233            ::unity::OptionalMethod,
234        ) -> crate::moon_sharp::interpreter::dynvalue::DynValue = ::core::mem::transmute(__mi.method_ptr);
235        __inner(this.into(), input, ::core::option::Option::None)
236    }
237}
238
239#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
240impl ReplHistoryInterpreter {
241    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, i32)` — overload selector"]
242    pub fn new(script: crate::moon_sharp::interpreter::script::Script, history_size: i32) -> Self {
243        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
244            panic!(
245                "{}
246::{}
247 failed to instantiate",
248                ::core::stringify!(ReplHistoryInterpreter),
249                ::core::stringify!(new),
250            )
251        });
252        <Self as IReplHistoryInterpreterMethods>::ctor(this, script, history_size);
253        this
254    }
255}
256
257#[cfg(feature = "moon_sharp-interpreter-repl-replhistoryinterpreter")]
258#[doc(hidden)]
259pub mod prelude {
260    pub use super::{IReplHistoryInterpreter, IReplHistoryInterpreterMethods, ReplHistoryInterpreter};
261    #[cfg(feature = "moon_sharp-interpreter-repl-replinterpreter")]
262    pub use crate::moon_sharp::interpreter::repl::replinterpreter::IReplInterpreterMethods;
263    #[cfg(feature = "system-object")]
264    pub use crate::system::object::IObjectMethods;
265    pub use crate::{moon_sharp::interpreter::repl::replinterpreter::IReplInterpreter, system::object::IObject};
266}