Skip to main content

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

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        moon_sharp::interpreter::loaders::{
10            filesystemscriptloader::{FileSystemScriptLoader, IFileSystemScriptLoader},
11            scriptloaderbase::{IScriptLoaderBase, ScriptLoaderBase},
12        },
13        system::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/repl/replinterpreterscriptloader/ReplInterpreterScriptLoader.md"))]
17    #[::unity::class(namespace = "MoonSharp.Interpreter.REPL", name = "ReplInterpreterScriptLoader")]
18    #[parent(crate::moon_sharp::interpreter::loaders::filesystemscriptloader::FileSystemScriptLoader)]
19    pub struct ReplInterpreterScriptLoader {}
20}
21
22#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader-types")]
23pub use __types::*;
24
25#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
26#[doc(hidden)]
27#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
28mod __ReplInterpreterScriptLoader_unity_raw {
29    use super::*;
30    #[doc(hidden)]
31    #[allow(non_snake_case)]
32    pub mod __lookup_ctor {
33        use super::*;
34        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
35            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
36            ::unity::lookup::method_info_on_class_with_signature(
37                <ReplInterpreterScriptLoader as ::unity::ClassIdentity>::class(),
38                ".ctor",
39                0,
40                param_types,
41                false,
42            )
43        });
44        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
45            match &*METHOD {
46                ::core::result::Result::Ok(mi) => *mi,
47                ::core::result::Result::Err(e) => {
48                    panic!(
49                        "method lookup failed: {}
50::{}
51: {}
52",
53                        <ReplInterpreterScriptLoader as ::unity::ClassIdentity>::NAME,
54                        ".ctor",
55                        e
56                    )
57                },
58            }
59        }
60    }
61}
62
63#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
64pub trait IReplInterpreterScriptLoaderMethods: IReplInterpreterScriptLoader {
65    #[doc = "`.ctor()` overload"]
66    fn ctor(self) -> () {
67        unsafe {
68            let __receiver =
69                <ReplInterpreterScriptLoader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
70            ::unity::il2cpp_call!(__ReplInterpreterScriptLoader_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
71(ReplInterpreterScriptLoader)__receiver)
72        }
73    }
74    #[doc = "`ResolveModuleName(::unity::Il2CppString, crate::moon_sharp::interpreter::table::Table)` overload"]
75    fn resolve_module_name(
76        self,
77        modname: impl ::core::convert::Into<::unity::Il2CppString>,
78        global_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>,
79    ) -> ::unity::Il2CppString {
80        unsafe {
81            let __receiver =
82                <ReplInterpreterScriptLoader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83            {
84                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
85                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
86                    panic!(
87                        "unity: virtual slot {}
88 out of range (vtable len {}
89) on the runtime class behind {}
90 (method `{}
91`)",
92                        10usize,
93                        __vt.len(),
94                        <ReplInterpreterScriptLoader as ::unity::ClassIdentity>::NAME,
95                        "ResolveModuleName",
96                    )
97                });
98                let __inner: extern "C" fn(
99                    ReplInterpreterScriptLoader,
100                    ::unity::Il2CppString,
101                    crate::moon_sharp::interpreter::table::Table,
102                    ::unity::OptionalMethod,
103                ) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
104                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
105                __inner(
106                    __receiver,
107                    ::core::convert::Into::into(modname),
108                    ::core::convert::Into::into(global_context),
109                    __mi,
110                )
111            }
112        }
113    }
114}
115
116#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
117impl<__T: IReplInterpreterScriptLoader> IReplInterpreterScriptLoaderMethods for __T {}
118
119#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
120impl ReplInterpreterScriptLoader {
121    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
122        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
123    }
124
125    pub fn resolve_module_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
126        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
127    }
128}
129
130#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
131impl ReplInterpreterScriptLoader {
132    #[doc = "Direct (non-virtual) call to `ReplInterpreterScriptLoader`'s own `ResolveModuleName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
133    pub unsafe fn resolve_module_name(
134        this: impl ::core::convert::Into<::unity::IlInstance>,
135        modname: ::unity::Il2CppString,
136        global_context: crate::moon_sharp::interpreter::table::Table,
137    ) -> ::unity::Il2CppString {
138        let __mi = Self::resolve_module_name_method_info();
139        let __inner: extern "C" fn(
140            ::unity::IlInstance,
141            ::unity::Il2CppString,
142            crate::moon_sharp::interpreter::table::Table,
143            ::unity::OptionalMethod,
144        ) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
145        __inner(this.into(), modname, global_context, ::core::option::Option::None)
146    }
147}
148
149#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
150impl ReplInterpreterScriptLoader {
151    #[doc = "`.ctor()` — no args"]
152    pub fn new() -> Self {
153        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
154            panic!(
155                "{}
156::{}
157 failed to instantiate",
158                ::core::stringify!(ReplInterpreterScriptLoader),
159                ::core::stringify!(new),
160            )
161        });
162        <Self as IReplInterpreterScriptLoaderMethods>::ctor(this);
163        this
164    }
165}
166
167#[cfg(feature = "moon_sharp-interpreter-repl-replinterpreterscriptloader")]
168#[doc(hidden)]
169pub mod prelude {
170    pub use super::{IReplInterpreterScriptLoader, IReplInterpreterScriptLoaderMethods, ReplInterpreterScriptLoader};
171    #[cfg(feature = "moon_sharp-interpreter-loaders-filesystemscriptloader")]
172    pub use crate::moon_sharp::interpreter::loaders::filesystemscriptloader::IFileSystemScriptLoaderMethods;
173    #[cfg(feature = "moon_sharp-interpreter-loaders-scriptloaderbase")]
174    pub use crate::moon_sharp::interpreter::loaders::scriptloaderbase::IScriptLoaderBaseMethods;
175    #[cfg(feature = "system-object")]
176    pub use crate::system::object::IObjectMethods;
177    pub use crate::{
178        moon_sharp::interpreter::loaders::{filesystemscriptloader::IFileSystemScriptLoader, scriptloaderbase::IScriptLoaderBase},
179        system::object::IObject,
180    };
181}