Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
IOStream.h
Go to the documentation of this file.
1#ifndef NW4HBM_UT_IO_STREAM_H
2#define NW4HBM_UT_IO_STREAM_H
3
4#include <revolution/types.h>
5
6#include "RuntimeTypeInfo.h"
7
8namespace nw4hbm {
9 namespace ut {
10
11 class IOStream {
12 public:
13 typedef void (*IOStreamCallback)(s32 result, IOStream* pStream, void* pCallbackArg);
14
15 IOStream() : mAvailable(false), mCallback(NULL), mArg(NULL) {}
16
18 /* 0x0C */ virtual ~IOStream() {}
19 /* 0x10 */ virtual void Close() = 0;
20 /* 0x14 */ virtual s32 Read(void* pDst, u32 size);
21 /* 0x18 */ virtual bool ReadAsync(void* pDst, u32 size, IOStreamCallback pCallback,
22 void* pCallbackArg);
23 /* 0x1C */ virtual void Write(const void* pSrc, u32 size);
24 /* 0x20 */ virtual bool WriteAsync(const void* pSrc, u32 size,
25 IOStreamCallback pCallback, void* pCallbackArg);
26 /* 0x24 */ virtual bool IsBusy() const;
27 /* 0x28 */ virtual bool CanAsync() const = 0;
28 /* 0x2C */ virtual bool CanRead() const = 0;
29 /* 0x30 */ virtual bool CanWrite() const = 0;
30 /* 0x34 */ virtual u32 GetOffsetAlign() const { return 1; }
31 /* 0x38 */ virtual u32 GetSizeAlign() const { return 1; }
32 /* 0x3C */ virtual u32 GetBufferAlign() const { return 1; }
33
34 bool IsAvailable() const { return mAvailable; }
35
36 protected:
37 /* 0x00 (vtable) */
38 /* 0x04 */ bool mAvailable;
39 /* 0x08 */ s32 mAsyncResult;
41 /* 0x10 */ void* mArg;
42 }; // size = 0x14
43
44 }; // namespace ut
45}; // namespace nw4hbm
46
47#endif
Definition IOStream.h:11
bool IsAvailable() const
Definition IOStream.h:34
virtual bool IsBusy() const
Definition ut_IOStream.cpp:47
virtual void Write(const void *pSrc, u32 size)
Definition ut_IOStream.cpp:30
virtual u32 GetOffsetAlign() const
Definition IOStream.h:30
void * mArg
Definition IOStream.h:41
void(*) IOStreamCallback(s32 result, IOStream *pStream, void *pCallbackArg)
Definition IOStream.h:13
IOStream()
Definition IOStream.h:15
NW4HBM_UT_RUNTIME_TYPEINFO
Definition IOStream.h:17
bool mAvailable
Definition IOStream.h:38
virtual bool CanWrite() const =0
IOStreamCallback mCallback
Definition IOStream.h:40
virtual bool ReadAsync(void *pDst, u32 size, IOStreamCallback pCallback, void *pCallbackArg)
Definition ut_IOStream.cpp:19
virtual u32 GetSizeAlign() const
Definition IOStream.h:31
virtual void Close()=0
virtual u32 GetBufferAlign() const
Definition IOStream.h:32
virtual bool WriteAsync(const void *pSrc, u32 size, IOStreamCallback pCallback, void *pCallbackArg)
Definition ut_IOStream.cpp:36
virtual bool CanRead() const =0
virtual s32 Read(void *pDst, u32 size)
Definition ut_IOStream.cpp:10
virtual bool CanAsync() const =0
virtual ~IOStream()
Definition IOStream.h:18
s32 mAsyncResult
Definition IOStream.h:39
unsigned int size
Definition __os.h:106
unsigned long u32
Definition types.h:12
signed long s32
Definition types.h:11
Definition HBMAnmController.h:6