API Guides > ConceptRT 3.x
MemoryStream< Capacity > Class Template Reference

Memory stream. More...

Detailed Description

template<Int32 Capacity>
class ConceptRT::MemoryStream< Capacity >

Memory stream.

Template Parameters
CapacityCapacity max of the memory stream.
+ Inheritance diagram for MemoryStream< Capacity >:

Public Member Methods

 MemoryStream ()
 Default constructor. More...
 
- Public Member Methods inherited from BaseMemoryStream
bool EndOfStream () const
 Query if end of stream reached. More...
 
Char8 ReadChar ()
 Reads a character. More...
 
void WriteChar (Char8 c)
 Writes a character. More...
 
void Flush ()
 Flushes this object. More...
 
Int32 GetPosition () const
 Gets the position. More...
 
void SetPosition (Int32 position)
 Sets the position cursor. More...
 
Int32 GetSize () const
 Gets the size of current usage. More...
 
void UpdateSize (Int32 size)
 Update the size of current usage of the stream. More...
 
void Clear ()
 Clears this object to its blank/initial state. More...
 
Pointer GetMemory ()
 Gets the memory. More...
 
void UpdateCapacity (Int32 expectedSize)
 Update the capacity of the stream. More...
 
Int32 GetCapacity () const
 Gets the capacity. More...
 
bool HasSameContent (BaseMemoryStream &stream)
 Query if this stream has same content than the given stream. More...
 
- Public Member Methods inherited from Stream
virtual ~Stream ()
 Destructor. More...
 
Int32 CopyFrom (Stream &stream, Int32 count)
 Copies from. More...
 
Int32 CopyFrom (Stream &stream)
 Copies from described by stream. More...
 

Protected Member Functions

void UpdateCapacity (Int32 expectedSize, Int32 &newCapacity, PChar8 &newBuffer)
 Update the capacity of the stream. More...
 

Constructor & Destructor Documentation

MemoryStream ( )
inline

Default constructor.

Methods Documentation

void UpdateCapacity ( Int32  expectedSize,
Int32 newCapacity,
PChar8 newBuffer 
)
inlineprotectedvirtual

Update the capacity of the stream.

Parameters
expectedSizeThe expected capacity size.
newCapacityThe new capacity.
newBuffer[in, out] The new buffer.
RT Exceptions:
RT_ERROR_CONTAINER_FULL

Implements BaseMemoryStream.