ezEngine  Milestone 7
ezMemoryStreamStorage Class Reference

Instances of this class act as storage for memory streams. More...

#include <MemoryStream.h>

Inheritance diagram for ezMemoryStreamStorage:

Public Member Functions

 ezMemoryStreamStorage (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.
 
ezUInt32 GetStorageSize () const
 Returns the number of bytes that is currently stored.
 
void Clear ()
 Clears the entire storage. All readers and writers must be reset to start from the beginning again.
 
const ezUInt8 * GetData () const
 
- Public Member Functions inherited from ezRefCounted
 ezRefCounted ()
 Constructor.
 
 ezRefCounted (const ezRefCounted &rhs)
 
void operator= (const ezRefCounted &rhs)
 
void AddRef ()
 Increments the reference counter.
 
void ReleaseRef ()
 Decrements the reference counter.
 
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
 
ezInt32 GetRefCount () const
 Returns the current reference count.
 

Private Attributes

ezHybridArray< ezUInt8, 256 > m_Storage
 

Friends

class ezMemoryStreamReader
 
class ezMemoryStreamWriter
 

Detailed Description

Instances of this class act as storage for memory streams.

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: