2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CMEMORYINSTREAM
|
|
|
|
#define _CMEMORYINSTREAM
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-07-20 06:19:07 +00:00
|
|
|
#include "Kyoto/Streams/CInputStream.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
class CMemoryInStream : public CInputStream {
|
|
|
|
public:
|
|
|
|
enum EOwnerShip {
|
2022-07-20 06:19:07 +00:00
|
|
|
kOS_Owned,
|
2022-07-20 06:20:28 +00:00
|
|
|
kOS_NotOwned,
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CMemoryInStream(const void* ptr, unsigned long len);
|
|
|
|
CMemoryInStream(const void* ptr, unsigned long len, EOwnerShip ownership);
|
2022-07-18 22:42:58 +00:00
|
|
|
virtual ~CMemoryInStream() override {}
|
2022-10-13 06:09:15 +00:00
|
|
|
virtual size_t Read(void* dest, size_t len) override;
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CMEMORYINSTREAM
|