ezEngine  Milestone 9
ezMemoryStreamStorage Class Reference

#include <MemoryStream.h>

Inheritance diagram for ezMemoryStreamStorage:

Public Member Functions

 ezMemoryStreamStorage (ezUInt32 uiInitialCapacity=0, ezAllocatorBase *pAllocator=ezFoundation::GetDefaultAllocator())
- Public Member Functions inherited from ezMemoryStreamContainerStorage< ezHybridArray< ezUInt8, 256 > >
 ezMemoryStreamContainerStorage (ezUInt32 uiInitialCapacity=0, ezAllocatorBase *pAllocator=ezFoundation::GetDefaultAllocator())
 Creates the storage object for a memory stream. Use uiInitialCapacity to reserve a some memory up front, to reduce reallocations.
virtual ezUInt32 GetStorageSize () const override
 Returns the number of bytes that is 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
 Calls Compact() on the internal array.
virtual ezUInt64 GetHeapMemoryUsage () const override
 Returns the amount of bytes that are currently allocated on the heap.
virtual const ezUInt8 * GetData () const override
 Returns a pointer to the internal data.
- Public Member Functions inherited from ezMemoryStreamStorageInterface
void ReadAll (ezStreamReader &Stream)
 Copies all data from the given stream into the storage.
- Public Member Functions inherited from ezRefCounted
 ezRefCounted ()
 ezRefCounted (const ezRefCounted &rhs)
void operator= (const ezRefCounted &rhs)
ezInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
ezInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
ezInt32 GetRefCount () const
 Returns the current reference count.

Detailed Description

ezMemoryStreamStorage holds internally an ezHybridArray<ezUInt8, 256>, to prevent allocations when only small temporary memory streams are needed. That means it will have a memory overhead of that size.

The documentation for this class was generated from the following file: