prime/include/Kyoto/Streams/CMemoryStreamOut.hpp
Phillip Stephens 0613bb5ea4 Match and link all remaining stream classes
Former-commit-id: 55617d2753c4fce8712586c8e3418ff6865e49a3
2022-10-12 23:10:20 -07:00

27 lines
538 B
C++

#ifndef _CMEMORYSTREAMOUT
#define _CMEMORYSTREAMOUT
#include "Kyoto/Streams/COutputStream.hpp"
class CMemoryStreamOut : public COutputStream {
public:
enum EOwnerShip {
kOS_Owned,
kOS_NotOwned,
};
CMemoryStreamOut(void* buffer, size_t len, EOwnerShip ownerShip = kOS_NotOwned,
int blockLen = 4096);
virtual ~CMemoryStreamOut();
void Write(const void* ptr, size_t len);
private:
void* mOutPtr;
size_t mOutLength;
size_t mCurrentPosition;
bool mBufferOwned;
};
#endif // _CMEMORYSTREAMOUT