NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ut_IOStream.h
1#ifndef NW4R_UT_IO_STREAM_H
2#define NW4R_UT_IO_STREAM_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/ut/ut_RuntimeTypeInfo.h>
6
7namespace nw4r {
8namespace ut {
9
10class IOStream {
11public:
12 NW4R_UT_RTTI_DECL(IOStream);
13
14 typedef void (*StreamCallback)(s32 result, IOStream* pStream,
15 void* pCallbackArg);
16
17public:
18 IOStream() : mAvailable(false), mCallback(NULL), mArg(NULL) {}
19 virtual ~IOStream() {} // at 0xC
20
21 virtual void Close() = 0; // at 0x10
22
23 virtual s32 Read(void* pDst, ulong size) = 0; // at 0x14
24 virtual bool ReadAsync(void* pDst, ulong size, StreamCallback pCallback,
25 void* pCallbackArg); // at 0x18
26
27 virtual void Write(const void* pSrc, ulong size); // at 0x1C
28 virtual bool WriteAsync(const void* pSrc, ulong size,
29 StreamCallback pCallback,
30 void* pCallbackArg); // at 0x20
31
32 virtual bool IsBusy() const; // at 0x24
33
34 virtual bool CanAsync() const = 0; // at 0x28
35 virtual bool CanRead() const = 0; // at 0x2C
36 virtual bool CanWrite() const = 0; // at 0x30
37
38 virtual ulong GetOffsetAlign() const {
39 return 1;
40 } // at 0x34
41 virtual ulong GetSizeAlign() const {
42 return 1;
43 } // at 0x38
44 virtual ulong GetBufferAlign() const {
45 return 1;
46 } // at 0x3C
47
48 bool IsAvailable() const {
49 return mAvailable;
50 }
51
52protected:
53 bool mAvailable; // at 0x4
54 s32 mAsyncResult; // at 0x8
55 StreamCallback mCallback; // at 0xC
56 void* mArg; // at 0x10
57};
58
59} // namespace ut
60} // namespace nw4r
61
62#endif
Debugging library which includes various utilities used by the rest of nw4r.
Definition ut_list.cpp:4