40 #ifndef _resourcememorystream_h
41 #define _resourcememorystream_h
67 Char8* BufferWritePos;// */
81 std::streampos CheckStreamPosition(
const std::streampos Position);
86 std::streamoff CheckStreamOffset(
const std::streamoff CursorOffset,
const std::streamoff Adjust);
89 std::streampos GetReadPosition()
const;
92 std::streampos GetWritePosition()
const;
100 virtual void imbue(
const std::locale& loc);
109 virtual std::streambuf* setbuf(
char* s, std::streamsize n);
116 virtual std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);
122 virtual std::streampos seekpos(std::streampos sp, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);
132 virtual std::streamsize showmanyc();
137 virtual std::streamsize xsgetn(
char* s, std::streamsize n);
143 virtual int underflow();
153 virtual int pbackfail(
int c = traits_type::eof());
162 virtual std::streamsize xsputn(
const char* s, std::streamsize n);
168 virtual int overflow(
int c = traits_type::eof());
182 void CreateBuffer(
const Whole Size);
187 void SetBuffer(
char* Buffer,
const Whole BufferSize,
const Boole FreeBuf);
191 void CopyBuffer(
const char* Buffer,
const Whole BufferSize);
195 Char8* GetBufferStart()
const;
198 Char8* GetBufferEnd()
const;
201 std::streamsize GetBufferSize()
const;
206 void ConfigureBuffer(
const std::streampos Pos, std::ios_base::openmode Mode = std::ios_base::in | std::ios_base::out);
208 void DestroyBuffer();
212 void SetFreeBuffer(
const Boole FreeBuf);
215 Boole GetFreeBuffer()
const;
270 Char8* GetBufferStart()
const;
273 Char8* GetBufferEnd()
const;
277 void SetFreeBuffer(
const Boole FreeBuf);
280 Boole GetFreeBuffer()
const;
Char8 * BufferStart
A pointer to the start of this memory buffer.
bool Boole
Generally acts a single bit, true or false.
Whole OpenMode
A bitfield describing the settings this buffer was opened with.
Base class for streams that support both read and write operations.
char Char8
A datatype to represent one character.
An I/O stream to a buffer of memory.
Permit write operations on the stream.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
std::streamsize StreamSize
Convenience define for the stream size datatype.
Char8 * BufferEnd
A pointer to one passed the last element in the range of this buffer.
MemoryStreamBuffer Buffer
The buffer object being streamed to/from.
A stream buffer object to a chunk of memory.
Declaration of DataStream.
Boole FreeBuffer
Stores whether or not the memory allocated will be free'd when this buffer is deleted.
Permit read operations on the stream.