Skip to main content

engage/generated/moon_sharp/interpreter/loaders/
iscriptloader.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/loaders/iscriptloader/IScriptLoader.md"))]
10    #[::unity::class(namespace = "MoonSharp.Interpreter.Loaders", name = "IScriptLoader")]
11    pub struct IScriptLoader {}
12}
13
14#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader-types")]
15pub use __types::*;
16
17#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader")]
18pub trait IIScriptLoaderMethods: IIScriptLoader {
19    #[doc = "`LoadFile(::unity::Il2CppString, crate::moon_sharp::interpreter::table::Table)` overload"]
20    fn load_file(
21        self,
22        file: impl ::core::convert::Into<::unity::Il2CppString>,
23        global_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>,
24    ) -> crate::system::object::Object {
25        unsafe {
26            let __receiver = <IScriptLoader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
27            {
28                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
29                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
30                    panic!(
31                        "unity: virtual slot {}
32 out of range (vtable len {}
33) on the runtime class behind {}
34 (method `{}
35`)",
36                        0usize,
37                        __vt.len(),
38                        <IScriptLoader as ::unity::ClassIdentity>::NAME,
39                        "LoadFile",
40                    )
41                });
42                let __inner: extern "C" fn(
43                    IScriptLoader,
44                    ::unity::Il2CppString,
45                    crate::moon_sharp::interpreter::table::Table,
46                    ::unity::OptionalMethod,
47                ) -> crate::system::object::Object = ::core::mem::transmute(__vi.method_ptr);
48                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
49                __inner(
50                    __receiver,
51                    ::core::convert::Into::into(file),
52                    ::core::convert::Into::into(global_context),
53                    __mi,
54                )
55            }
56        }
57    }
58    #[doc = "`ResolveFileName(::unity::Il2CppString, crate::moon_sharp::interpreter::table::Table)` overload"]
59    fn resolve_file_name(
60        self,
61        filename: impl ::core::convert::Into<::unity::Il2CppString>,
62        global_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>,
63    ) -> ::unity::Il2CppString {
64        unsafe {
65            let __receiver = <IScriptLoader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
66            {
67                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
68                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
69                    panic!(
70                        "unity: virtual slot {}
71 out of range (vtable len {}
72) on the runtime class behind {}
73 (method `{}
74`)",
75                        1usize,
76                        __vt.len(),
77                        <IScriptLoader as ::unity::ClassIdentity>::NAME,
78                        "ResolveFileName",
79                    )
80                });
81                let __inner: extern "C" fn(
82                    IScriptLoader,
83                    ::unity::Il2CppString,
84                    crate::moon_sharp::interpreter::table::Table,
85                    ::unity::OptionalMethod,
86                ) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
87                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
88                __inner(
89                    __receiver,
90                    ::core::convert::Into::into(filename),
91                    ::core::convert::Into::into(global_context),
92                    __mi,
93                )
94            }
95        }
96    }
97    #[doc = "`ResolveModuleName(::unity::Il2CppString, crate::moon_sharp::interpreter::table::Table)` overload"]
98    fn resolve_module_name(
99        self,
100        modname: impl ::core::convert::Into<::unity::Il2CppString>,
101        global_context: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>,
102    ) -> ::unity::Il2CppString {
103        unsafe {
104            let __receiver = <IScriptLoader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
105            {
106                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
107                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
108                    panic!(
109                        "unity: virtual slot {}
110 out of range (vtable len {}
111) on the runtime class behind {}
112 (method `{}
113`)",
114                        2usize,
115                        __vt.len(),
116                        <IScriptLoader as ::unity::ClassIdentity>::NAME,
117                        "ResolveModuleName",
118                    )
119                });
120                let __inner: extern "C" fn(
121                    IScriptLoader,
122                    ::unity::Il2CppString,
123                    crate::moon_sharp::interpreter::table::Table,
124                    ::unity::OptionalMethod,
125                ) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
126                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
127                __inner(
128                    __receiver,
129                    ::core::convert::Into::into(modname),
130                    ::core::convert::Into::into(global_context),
131                    __mi,
132                )
133            }
134        }
135    }
136}
137
138#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader")]
139impl<__T: IIScriptLoader> IIScriptLoaderMethods for __T {}
140
141#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader")]
142impl IScriptLoader {
143    pub fn load_file_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
145    }
146
147    pub fn resolve_file_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
148        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
149    }
150
151    pub fn resolve_module_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
153    }
154}
155
156#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader")]
157impl IScriptLoader {
158    #[doc = "Direct (non-virtual) call to `IScriptLoader`'s own `LoadFile`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
159    pub unsafe fn load_file(
160        this: impl ::core::convert::Into<::unity::IlInstance>,
161        file: ::unity::Il2CppString,
162        global_context: crate::moon_sharp::interpreter::table::Table,
163    ) -> crate::system::object::Object {
164        let __mi = Self::load_file_method_info();
165        let __inner: extern "C" fn(
166            ::unity::IlInstance,
167            ::unity::Il2CppString,
168            crate::moon_sharp::interpreter::table::Table,
169            ::unity::OptionalMethod,
170        ) -> crate::system::object::Object = ::core::mem::transmute(__mi.method_ptr);
171        __inner(this.into(), file, global_context, ::core::option::Option::None)
172    }
173
174    #[doc = "Direct (non-virtual) call to `IScriptLoader`'s own `ResolveFileName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
175    pub unsafe fn resolve_file_name(
176        this: impl ::core::convert::Into<::unity::IlInstance>,
177        filename: ::unity::Il2CppString,
178        global_context: crate::moon_sharp::interpreter::table::Table,
179    ) -> ::unity::Il2CppString {
180        let __mi = Self::resolve_file_name_method_info();
181        let __inner: extern "C" fn(
182            ::unity::IlInstance,
183            ::unity::Il2CppString,
184            crate::moon_sharp::interpreter::table::Table,
185            ::unity::OptionalMethod,
186        ) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
187        __inner(this.into(), filename, global_context, ::core::option::Option::None)
188    }
189
190    #[doc = "Direct (non-virtual) call to `IScriptLoader`'s own `ResolveModuleName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
191    pub unsafe fn resolve_module_name(
192        this: impl ::core::convert::Into<::unity::IlInstance>,
193        modname: ::unity::Il2CppString,
194        global_context: crate::moon_sharp::interpreter::table::Table,
195    ) -> ::unity::Il2CppString {
196        let __mi = Self::resolve_module_name_method_info();
197        let __inner: extern "C" fn(
198            ::unity::IlInstance,
199            ::unity::Il2CppString,
200            crate::moon_sharp::interpreter::table::Table,
201            ::unity::OptionalMethod,
202        ) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
203        __inner(this.into(), modname, global_context, ::core::option::Option::None)
204    }
205}
206
207#[cfg(feature = "moon_sharp-interpreter-loaders-iscriptloader")]
208#[doc(hidden)]
209pub mod prelude {
210    pub use super::{IIScriptLoader, IIScriptLoaderMethods, IScriptLoader};
211}