API Guides > ConceptRT 3.x
MemoryStreamDynamicFixed Class Reference

Dynamic Fixed Memory stream whose size is fixed at the construction time. Construction is non-deterministic. Usage is deterministic. More...

Detailed Description

Dynamic Fixed Memory stream whose size is fixed at the construction time. Construction is non-deterministic. Usage is deterministic.

+ Inheritance diagram for MemoryStreamDynamicFixed:

Public Member Methods

 MemoryStreamDynamicFixed (Int32 capacity)
 Constructor. More...
 
 ~MemoryStreamDynamicFixed ()
 Destructor. 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

Constructor.

Parameters
capacityThe capacity.
Warning
Non-Deterministic: The dynamic memory is created on the heap. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.

Destructor.

Warning
Non-Deterministic. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.

Methods Documentation

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

Update the capacity of the stream.

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

Implements BaseMemoryStream.