summaryrefslogtreecommitdiff
path: root/include/JSystem/JSupport/JSUMemoryStream.h
blob: 0ef47035556fd197d071608fc3b40550a8a7f723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef JSUMEMORYSTREAM_H
#define JSUMEMORYSTREAM_H

#include "JSystem/JSupport/JSURandomInputStream.h"

/**
* @ingroup jsystem-jsupport
* 
*/
class JSUMemoryInputStream : public JSURandomInputStream {
public:
    JSUMemoryInputStream(const void* res, u32 size) { setBuffer(res, size); }

    /* 802552B8 */ virtual ~JSUMemoryInputStream() {}
    /* 802DC520 */ void setBuffer(void const*, s32);
    /* 802DC534 */ u32 readData(void*, s32);
    /* 802DC5AC */ s32 seekPos(s32, JSUStreamSeekFrom);
    /* 802DC628 */ s32 getLength() const;
    /* 802DC630 */ s32 getPosition() const;

private:
    /* 0x08 */ const void* mBuffer;
    /* 0x0C */ s32 mLength;
    /* 0x10 */ s32 mPosition;
};  // Size = 0x14

#endif /* JSUMEMORYSTREAM_H */