Skip to main content

engage/generated/moon_sharp/interpreter/debugging/
debugservice.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice-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/debugging/debugservice/DebugService.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Debugging", name = "DebugService")]
12    #[parent(crate::system::object::Object)]
13    pub struct DebugService {
14        #[offset(16)]
15        #[rename(name = "m_Processor")]
16        pub m_processor: crate::moon_sharp::interpreter::execution::vm::processor::Processor,
17    }
18}
19
20#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice-types")]
21pub use __types::*;
22
23#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
24#[doc(hidden)]
25#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
26mod __DebugService_unity_raw {
27    use super::*;
28    #[doc(hidden)]
29    #[allow(non_snake_case)]
30    pub mod __lookup_ctor {
31        use super::*;
32        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
33            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
34                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
35                <crate::moon_sharp::interpreter::execution::vm::processor::Processor as ::unity::IlType>::il_type(),
36            ];
37            ::unity::lookup::method_info_on_class_with_signature(<DebugService as ::unity::ClassIdentity>::class(), ".ctor", 2, param_types, false)
38        });
39        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
40            match &*METHOD {
41                ::core::result::Result::Ok(mi) => *mi,
42                ::core::result::Result::Err(e) => {
43                    panic!(
44                        "method lookup failed: {}
45::{}
46: {}
47",
48                        <DebugService as ::unity::ClassIdentity>::NAME,
49                        ".ctor",
50                        e
51                    )
52                },
53            }
54        }
55    }
56    #[doc(hidden)]
57    #[allow(non_snake_case)]
58    pub mod __lookup_set_owner_script {
59        use super::*;
60        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
61            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
62                &[<crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type()];
63            ::unity::lookup::method_info_on_class_with_signature(
64                <DebugService as ::unity::ClassIdentity>::class(),
65                "set_OwnerScript",
66                1,
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                        <DebugService as ::unity::ClassIdentity>::NAME,
81                        "set_OwnerScript",
82                        e
83                    )
84                },
85            }
86        }
87    }
88    #[doc(hidden)]
89    #[allow(non_snake_case)]
90    pub mod __lookup_reset_break_points {
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] = &[
94                <crate::moon_sharp::interpreter::debugging::sourcecode::SourceCode as ::unity::IlType>::il_type(),
95                <crate::system::collections::generic::hashset_1::HashSet_1<i32> as ::unity::IlType>::il_type(),
96            ];
97            ::unity::lookup::method_info_on_class_with_signature(
98                <DebugService as ::unity::ClassIdentity>::class(),
99                "ResetBreakPoints",
100                2,
101                param_types,
102                false,
103            )
104        });
105        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
106            match &*METHOD {
107                ::core::result::Result::Ok(mi) => *mi,
108                ::core::result::Result::Err(e) => {
109                    panic!(
110                        "method lookup failed: {}
111::{}
112: {}
113",
114                        <DebugService as ::unity::ClassIdentity>::NAME,
115                        "ResetBreakPoints",
116                        e
117                    )
118                },
119            }
120        }
121    }
122}
123
124#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
125pub trait IDebugServiceMethods: IDebugService {
126    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, crate::moon_sharp::interpreter::execution::vm::processor::Processor)` overload"]
127    fn ctor(
128        self,
129        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
130        processor: impl ::core::convert::Into<crate::moon_sharp::interpreter::execution::vm::processor::Processor>,
131    ) -> () {
132        unsafe {
133            let __receiver = <DebugService as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
134            ::unity::il2cpp_call!(__DebugService_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
135(DebugService)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script),(crate::moon_sharp::interpreter::execution::vm::processor::Processor)::core::convert::Into::into(processor))
136        }
137    }
138    #[doc = "`get_OwnerScript()` overload"]
139    fn get_owner_script(self) -> crate::moon_sharp::interpreter::script::Script {
140        unsafe {
141            let __receiver = <DebugService as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
142            {
143                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
144                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
145                    panic!(
146                        "unity: virtual slot {}
147 out of range (vtable len {}
148) on the runtime class behind {}
149 (method `{}
150`)",
151                        4usize,
152                        __vt.len(),
153                        <DebugService as ::unity::ClassIdentity>::NAME,
154                        "get_OwnerScript",
155                    )
156                });
157                let __inner: extern "C" fn(DebugService, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
158                    ::core::mem::transmute(__vi.method_ptr);
159                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
160                __inner(__receiver, __mi)
161            }
162        }
163    }
164    #[doc = "`set_OwnerScript(crate::moon_sharp::interpreter::script::Script)` overload"]
165    fn set_owner_script(self, value: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>) -> () {
166        unsafe {
167            let __receiver = <DebugService as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
168            ::unity::il2cpp_call!(__DebugService_unity_raw::__lookup_set_owner_script::get_method_info().method_ptr,();
169(DebugService)__receiver,(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(value))
170        }
171    }
172    #[doc = "`ResetBreakPoints(crate::moon_sharp::interpreter::debugging::sourcecode::SourceCode, crate::system::collections::generic::hashset_1::HashSet_1<i32>)` overload"]
173    fn reset_break_points(
174        self,
175        src: impl ::core::convert::Into<crate::moon_sharp::interpreter::debugging::sourcecode::SourceCode>,
176        lines: impl ::core::convert::Into<crate::system::collections::generic::hashset_1::HashSet_1<i32>>,
177    ) -> crate::system::collections::generic::hashset_1::HashSet_1<i32> {
178        unsafe {
179            let __receiver = <DebugService as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
180            ::unity::il2cpp_call!(__DebugService_unity_raw::__lookup_reset_break_points::get_method_info().method_ptr,crate::system::collections::generic::hashset_1::HashSet_1<i32> ;
181(DebugService)__receiver,(crate::moon_sharp::interpreter::debugging::sourcecode::SourceCode)::core::convert::Into::into(src),(crate::system::collections::generic::hashset_1::HashSet_1<i32>)::core::convert::Into::into(lines))
182        }
183    }
184}
185
186#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
187impl<__T: IDebugService> IDebugServiceMethods for __T {}
188
189#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
190impl DebugService {
191    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
193    }
194
195    pub fn get_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
197    }
198
199    pub fn set_owner_script_method_info() -> &'static ::unity::il2cpp::MethodInfo {
200        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
201    }
202
203    pub fn reset_break_points_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
205    }
206}
207
208#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
209impl DebugService {
210    #[doc = "Direct (non-virtual) call to `DebugService`'s own `get_OwnerScript`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
211    pub unsafe fn get_owner_script(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::moon_sharp::interpreter::script::Script {
212        let __mi = Self::get_owner_script_method_info();
213        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::moon_sharp::interpreter::script::Script =
214            ::core::mem::transmute(__mi.method_ptr);
215        __inner(this.into(), ::core::option::Option::None)
216    }
217}
218
219#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
220impl DebugService {
221    #[doc = "`.ctor(crate::moon_sharp::interpreter::script::Script, crate::moon_sharp::interpreter::execution::vm::processor::Processor)` — overload selector"]
222    pub fn new(
223        script: crate::moon_sharp::interpreter::script::Script,
224        processor: crate::moon_sharp::interpreter::execution::vm::processor::Processor,
225    ) -> Self {
226        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
227            panic!(
228                "{}
229::{}
230 failed to instantiate",
231                ::core::stringify!(DebugService),
232                ::core::stringify!(new),
233            )
234        });
235        <Self as IDebugServiceMethods>::ctor(this, script, processor);
236        this
237    }
238}
239
240#[cfg(feature = "moon_sharp-interpreter-debugging-debugservice")]
241#[doc(hidden)]
242pub mod prelude {
243    pub use super::{DebugService, IDebugService, IDebugServiceMethods};
244    pub use crate::system::object::IObject;
245    #[cfg(feature = "system-object")]
246    pub use crate::system::object::IObjectMethods;
247}