![]() |
XII Release 0.1.0
|
Wrapper around an existing container to implement xiiMemoryStreamStorageInterface. More...
#include <MemoryStream.h>
Public Member Functions | |
xiiMemoryStreamContainerWrapperStorage (CONTAINER *pContainer) | |
virtual xiiUInt64 | GetStorageSize64 () const override |
Returns the number of bytes that are currently stored. | |
virtual void | Clear () override |
Clears the entire storage. All readers and writers must be reset to start from the beginning again. | |
virtual void | Compact () override |
Deallocates any allocated memory that's not needed to hold the currently stored data. | |
virtual xiiUInt64 | GetHeapMemoryUsage () const override |
Returns the amount of bytes that are currently allocated on the heap. | |
virtual void | Reserve (xiiUInt64 uiBytes) override |
Reserves N bytes of storage. | |
virtual xiiResult | CopyToStream (xiiStreamWriter &ref_stream) const override |
Writes the entire content of the storage to the provided stream. | |
virtual xiiArrayPtr< const xiiUInt8 > | GetContiguousMemoryRange (xiiUInt64 uiStartByte) const override |
Returns a read-only xiiArrayPtr that represents a contiguous area in memory which starts at the given first byte. | |
virtual xiiArrayPtr< xiiUInt8 > | GetContiguousMemoryRange (xiiUInt64 uiStartByte) override |
Non-const overload of GetContiguousMemoryRange(). | |
![]() | |
xiiUInt32 | GetStorageSize32 () const |
Returns the number of bytes that are currently stored. Asserts that the stored amount is less than 4GB. | |
void | ReadAll (xiiStreamReader &ref_stream, xiiUInt64 uiMaxBytes=xiiMath::MaxValue< xiiUInt64 >()) |
Copies all data from the given stream into the storage. | |
Wrapper around an existing container to implement xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Clears the entire storage. All readers and writers must be reset to start from the beginning again.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Deallocates any allocated memory that's not needed to hold the currently stored data.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Writes the entire content of the storage to the provided stream.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Returns a read-only xiiArrayPtr that represents a contiguous area in memory which starts at the given first byte.
This piece of memory can be read/copied/modified in one operation (memcpy etc). The next byte after this slice may be located somewhere entirely different in memory. Call GetContiguousMemoryRange() again with the next byte after this range, to get access to the next memory area.
Chunks may differ in size.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Non-const overload of GetContiguousMemoryRange().
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Returns the amount of bytes that are currently allocated on the heap.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Returns the number of bytes that are currently stored.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverridevirtual |
Reserves N bytes of storage.
Implements xiiMemoryStreamStorageInterface.
|
inlineoverrideprivatevirtual |
Implements xiiMemoryStreamStorageInterface.