Skip to main content

engage/generated/moon_sharp/interpreter/io/
bindumpbinaryreader.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        io::binaryreader::{BinaryReader, IBinaryReader},
10        object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/io/bindumpbinaryreader/BinDumpBinaryReader.md"))]
14    #[::unity::class(namespace = "MoonSharp.Interpreter.IO", name = "BinDumpBinaryReader")]
15    #[parent(crate::system::io::binaryreader::BinaryReader)]
16    pub struct BinDumpBinaryReader {
17        #[offset(72)]
18        #[rename(name = "m_Strings")]
19        pub m_strings: crate::system::collections::generic::list_1::List_1<::unity::Il2CppString>,
20    }
21}
22
23#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader-types")]
24pub use __types::*;
25
26#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
27#[doc(hidden)]
28#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
29mod __BinDumpBinaryReader_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] = &[<crate::system::io::stream::Stream as ::unity::IlType>::il_type()];
37            ::unity::lookup::method_info_on_class_with_signature(
38                <BinDumpBinaryReader as ::unity::ClassIdentity>::class(),
39                ".ctor",
40                1,
41                param_types,
42                false,
43            )
44        });
45        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
46            match &*METHOD {
47                ::core::result::Result::Ok(mi) => *mi,
48                ::core::result::Result::Err(e) => {
49                    panic!(
50                        "method lookup failed: {}
51::{}
52: {}
53",
54                        <BinDumpBinaryReader as ::unity::ClassIdentity>::NAME,
55                        ".ctor",
56                        e
57                    )
58                },
59            }
60        }
61    }
62}
63
64#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
65pub trait IBinDumpBinaryReaderMethods: IBinDumpBinaryReader {
66    #[doc = "`.ctor(crate::system::io::stream::Stream)` overload"]
67    fn ctor(self, s: impl ::core::convert::Into<crate::system::io::stream::Stream>) -> () {
68        unsafe {
69            let __receiver = <BinDumpBinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
70            ::unity::il2cpp_call!(__BinDumpBinaryReader_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
71(BinDumpBinaryReader)__receiver,(crate::system::io::stream::Stream)::core::convert::Into::into(s))
72        }
73    }
74    #[doc = "`ReadInt32()` overload"]
75    fn read_int32(self) -> i32 {
76        unsafe {
77            let __receiver = <BinDumpBinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
78            {
79                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
80                let __vi = *__vt.get(15usize).unwrap_or_else(|| {
81                    panic!(
82                        "unity: virtual slot {}
83 out of range (vtable len {}
84) on the runtime class behind {}
85 (method `{}
86`)",
87                        15usize,
88                        __vt.len(),
89                        <BinDumpBinaryReader as ::unity::ClassIdentity>::NAME,
90                        "ReadInt32",
91                    )
92                });
93                let __inner: extern "C" fn(BinDumpBinaryReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
94                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
95                __inner(__receiver, __mi)
96            }
97        }
98    }
99    #[doc = "`ReadUInt32()` overload"]
100    fn read_u_int32(self) -> u32 {
101        unsafe {
102            let __receiver = <BinDumpBinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103            {
104                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
105                let __vi = *__vt.get(16usize).unwrap_or_else(|| {
106                    panic!(
107                        "unity: virtual slot {}
108 out of range (vtable len {}
109) on the runtime class behind {}
110 (method `{}
111`)",
112                        16usize,
113                        __vt.len(),
114                        <BinDumpBinaryReader as ::unity::ClassIdentity>::NAME,
115                        "ReadUInt32",
116                    )
117                });
118                let __inner: extern "C" fn(BinDumpBinaryReader, ::unity::OptionalMethod) -> u32 = ::core::mem::transmute(__vi.method_ptr);
119                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
120                __inner(__receiver, __mi)
121            }
122        }
123    }
124    #[doc = "`ReadString()` overload"]
125    fn read_string(self) -> ::unity::Il2CppString {
126        unsafe {
127            let __receiver = <BinDumpBinaryReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
128            {
129                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
130                let __vi = *__vt.get(22usize).unwrap_or_else(|| {
131                    panic!(
132                        "unity: virtual slot {}
133 out of range (vtable len {}
134) on the runtime class behind {}
135 (method `{}
136`)",
137                        22usize,
138                        __vt.len(),
139                        <BinDumpBinaryReader as ::unity::ClassIdentity>::NAME,
140                        "ReadString",
141                    )
142                });
143                let __inner: extern "C" fn(BinDumpBinaryReader, ::unity::OptionalMethod) -> ::unity::Il2CppString =
144                    ::core::mem::transmute(__vi.method_ptr);
145                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
146                __inner(__receiver, __mi)
147            }
148        }
149    }
150}
151
152#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
153impl<__T: IBinDumpBinaryReader> IBinDumpBinaryReaderMethods for __T {}
154
155#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
156impl BinDumpBinaryReader {
157    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
159    }
160
161    pub fn read_int32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
163    }
164
165    pub fn read_u_int32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
167    }
168
169    pub fn read_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
171    }
172}
173
174#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
175impl BinDumpBinaryReader {
176    #[doc = "Direct (non-virtual) call to `BinDumpBinaryReader`'s own `ReadInt32`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
177    pub unsafe fn read_int32(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
178        let __mi = Self::read_int32_method_info();
179        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
180        __inner(this.into(), ::core::option::Option::None)
181    }
182
183    #[doc = "Direct (non-virtual) call to `BinDumpBinaryReader`'s own `ReadUInt32`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
184    pub unsafe fn read_u_int32(this: impl ::core::convert::Into<::unity::IlInstance>) -> u32 {
185        let __mi = Self::read_u_int32_method_info();
186        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> u32 = ::core::mem::transmute(__mi.method_ptr);
187        __inner(this.into(), ::core::option::Option::None)
188    }
189
190    #[doc = "Direct (non-virtual) call to `BinDumpBinaryReader`'s own `ReadString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
191    pub unsafe fn read_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
192        let __mi = Self::read_string_method_info();
193        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
194        __inner(this.into(), ::core::option::Option::None)
195    }
196}
197
198#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
199impl BinDumpBinaryReader {
200    #[doc = "`.ctor(crate::system::io::stream::Stream)` — overload selector"]
201    pub fn new(s: crate::system::io::stream::Stream) -> Self {
202        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
203            panic!(
204                "{}
205::{}
206 failed to instantiate",
207                ::core::stringify!(BinDumpBinaryReader),
208                ::core::stringify!(new),
209            )
210        });
211        <Self as IBinDumpBinaryReaderMethods>::ctor(this, s);
212        this
213    }
214}
215
216#[cfg(feature = "moon_sharp-interpreter-io-bindumpbinaryreader")]
217#[doc(hidden)]
218pub mod prelude {
219    pub use super::{BinDumpBinaryReader, IBinDumpBinaryReader, IBinDumpBinaryReaderMethods};
220    #[cfg(feature = "system-io-binaryreader")]
221    pub use crate::system::io::binaryreader::IBinaryReaderMethods;
222    #[cfg(feature = "system-object")]
223    pub use crate::system::object::IObjectMethods;
224    pub use crate::system::{io::binaryreader::IBinaryReader, object::IObject};
225}