Skip to main content

engage/generated/system/io/
cstreamreader.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-io-cstreamreader-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        io::{
10            streamreader::{IStreamReader, StreamReader},
11            textreader::{ITextReader, TextReader},
12        },
13        object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/cstreamreader/CStreamReader.md"))]
17    #[::unity::class(namespace = "System.IO", name = "CStreamReader")]
18    #[parent(crate::system::io::streamreader::StreamReader)]
19    pub struct CStreamReader {}
20}
21
22#[cfg(feature = "system-io-cstreamreader-types")]
23pub use __types::*;
24
25#[cfg(feature = "system-io-cstreamreader")]
26pub trait ICStreamReaderMethods: ICStreamReader {
27    #[doc = "`Peek()` overload"]
28    fn peek(self) -> i32 {
29        unsafe {
30            let __receiver = <CStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31            {
32                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
33                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
34                    panic!(
35                        "unity: virtual slot {}
36 out of range (vtable len {}
37) on the runtime class behind {}
38 (method `{}
39`)",
40                        9usize,
41                        __vt.len(),
42                        <CStreamReader as ::unity::ClassIdentity>::NAME,
43                        "Peek",
44                    )
45                });
46                let __inner: extern "C" fn(CStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
47                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
48                __inner(__receiver, __mi)
49            }
50        }
51    }
52    #[doc = "`Read()` overload"]
53    fn read(self) -> i32 {
54        unsafe {
55            let __receiver = <CStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56            {
57                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
58                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
59                    panic!(
60                        "unity: virtual slot {}
61 out of range (vtable len {}
62) on the runtime class behind {}
63 (method `{}
64`)",
65                        10usize,
66                        __vt.len(),
67                        <CStreamReader as ::unity::ClassIdentity>::NAME,
68                        "Read",
69                    )
70                });
71                let __inner: extern "C" fn(CStreamReader, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
72                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
73                __inner(__receiver, __mi)
74            }
75        }
76    }
77    #[doc = "`Read(::unity::Array<u16>, i32, i32)` overload"]
78    fn read_2(
79        self,
80        dest: impl ::core::convert::Into<::unity::Array<u16>>,
81        index: impl ::core::convert::Into<i32>,
82        count: impl ::core::convert::Into<i32>,
83    ) -> i32 {
84        unsafe {
85            let __receiver = <CStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86            {
87                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
88                let __vi = *__vt.get(11usize).unwrap_or_else(|| {
89                    panic!(
90                        "unity: virtual slot {}
91 out of range (vtable len {}
92) on the runtime class behind {}
93 (method `{}
94`)",
95                        11usize,
96                        __vt.len(),
97                        <CStreamReader as ::unity::ClassIdentity>::NAME,
98                        "Read",
99                    )
100                });
101                let __inner: extern "C" fn(CStreamReader, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
102                    ::core::mem::transmute(__vi.method_ptr);
103                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
104                __inner(
105                    __receiver,
106                    ::core::convert::Into::into(dest),
107                    ::core::convert::Into::into(index),
108                    ::core::convert::Into::into(count),
109                    __mi,
110                )
111            }
112        }
113    }
114    #[doc = "`ReadLine()` overload"]
115    fn read_line(self) -> ::unity::Il2CppString {
116        unsafe {
117            let __receiver = <CStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
118            {
119                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
120                let __vi = *__vt.get(14usize).unwrap_or_else(|| {
121                    panic!(
122                        "unity: virtual slot {}
123 out of range (vtable len {}
124) on the runtime class behind {}
125 (method `{}
126`)",
127                        14usize,
128                        __vt.len(),
129                        <CStreamReader as ::unity::ClassIdentity>::NAME,
130                        "ReadLine",
131                    )
132                });
133                let __inner: extern "C" fn(CStreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
134                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
135                __inner(__receiver, __mi)
136            }
137        }
138    }
139    #[doc = "`ReadToEnd()` overload"]
140    fn read_to_end(self) -> ::unity::Il2CppString {
141        unsafe {
142            let __receiver = <CStreamReader as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
143            {
144                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
145                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
146                    panic!(
147                        "unity: virtual slot {}
148 out of range (vtable len {}
149) on the runtime class behind {}
150 (method `{}
151`)",
152                        12usize,
153                        __vt.len(),
154                        <CStreamReader as ::unity::ClassIdentity>::NAME,
155                        "ReadToEnd",
156                    )
157                });
158                let __inner: extern "C" fn(CStreamReader, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::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}
165
166#[cfg(feature = "system-io-cstreamreader")]
167impl<__T: ICStreamReader> ICStreamReaderMethods for __T {}
168
169#[cfg(feature = "system-io-cstreamreader")]
170impl CStreamReader {
171    pub fn peek_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
173    }
174
175    pub fn read_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
177    }
178
179    pub fn read_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
181    }
182
183    pub fn read_line_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
185    }
186
187    pub fn read_to_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
189    }
190}
191
192#[cfg(feature = "system-io-cstreamreader")]
193impl CStreamReader {
194    #[doc = "Direct (non-virtual) call to `CStreamReader`'s own `Peek`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
195    pub unsafe fn peek(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
196        let __mi = Self::peek_method_info();
197        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
198        __inner(this.into(), ::core::option::Option::None)
199    }
200
201    #[doc = "Direct (non-virtual) call to `CStreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
202    pub unsafe fn read(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
203        let __mi = Self::read_method_info();
204        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
205        __inner(this.into(), ::core::option::Option::None)
206    }
207
208    #[doc = "Direct (non-virtual) call to `CStreamReader`'s own `Read`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
209    pub unsafe fn read_2(this: impl ::core::convert::Into<::unity::IlInstance>, dest: ::unity::Array<u16>, index: i32, count: i32) -> i32 {
210        let __mi = Self::read_2_method_info();
211        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Array<u16>, i32, i32, ::unity::OptionalMethod) -> i32 =
212            ::core::mem::transmute(__mi.method_ptr);
213        __inner(this.into(), dest, index, count, ::core::option::Option::None)
214    }
215
216    #[doc = "Direct (non-virtual) call to `CStreamReader`'s own `ReadLine`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
217    pub unsafe fn read_line(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
218        let __mi = Self::read_line_method_info();
219        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
220        __inner(this.into(), ::core::option::Option::None)
221    }
222
223    #[doc = "Direct (non-virtual) call to `CStreamReader`'s own `ReadToEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
224    pub unsafe fn read_to_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
225        let __mi = Self::read_to_end_method_info();
226        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
227        __inner(this.into(), ::core::option::Option::None)
228    }
229}
230
231#[cfg(feature = "system-io-cstreamreader")]
232#[doc(hidden)]
233pub mod prelude {
234    pub use super::{CStreamReader, ICStreamReader, ICStreamReaderMethods};
235    #[cfg(feature = "system-io-streamreader")]
236    pub use crate::system::io::streamreader::IStreamReaderMethods;
237    #[cfg(feature = "system-io-textreader")]
238    pub use crate::system::io::textreader::ITextReaderMethods;
239    #[cfg(feature = "system-object")]
240    pub use crate::system::object::IObjectMethods;
241    pub use crate::system::{
242        io::{streamreader::IStreamReader, textreader::ITextReader},
243        object::IObject,
244    };
245}