ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::MemoryWriteStreamDynamic Class Reference

A sort of hybrid between MemoryWriteStream and Array classes. More...

#include <memstream.h>

Inheritance diagram for Common::MemoryWriteStreamDynamic:
Collaboration diagram for Common::MemoryWriteStreamDynamic:

List of all members.

Public Member Functions

 MemoryWriteStreamDynamic (DisposeAfterUse::Flag disposeMemory)
 ~MemoryWriteStreamDynamic ()
uint32 write (const void *dataPtr, uint32 dataSize)
 Write data into the stream.
int32 pos () const
 Obtains the current value of the stream position indicator of the stream.
uint32 size () const
bytegetData ()
bool seek (int32 offset, int whence=SEEK_SET)

Protected Member Functions

void ensureCapacity (uint32 new_len)

Protected Attributes

uint32 _capacity
uint32 _size
byte_ptr
byte_data
uint32 _pos
DisposeAfterUse::Flag _disposeMemory

Detailed Description

A sort of hybrid between MemoryWriteStream and Array classes.

A stream that grows as it's written to.

Definition at line 159 of file memstream.h.


Constructor & Destructor Documentation

Common::MemoryWriteStreamDynamic::MemoryWriteStreamDynamic ( DisposeAfterUse::Flag  disposeMemory  )  [inline, explicit]

Definition at line 187 of file memstream.h.

Common::MemoryWriteStreamDynamic::~MemoryWriteStreamDynamic (  )  [inline]

Definition at line 189 of file memstream.h.


Member Function Documentation

void Common::MemoryWriteStreamDynamic::ensureCapacity ( uint32  new_len  )  [inline, protected]

Definition at line 168 of file memstream.h.

byte* Common::MemoryWriteStreamDynamic::getData (  )  [inline]

Definition at line 207 of file memstream.h.

int32 Common::MemoryWriteStreamDynamic::pos (  )  const [inline, virtual]

Obtains the current value of the stream position indicator of the stream.

Returns:
the current position indicator, or -1 if an error occurred.

Implements Common::WriteStream.

Definition at line 204 of file memstream.h.

bool Common::MemoryWriteStreamDynamic::seek ( int32  offset,
int  whence = SEEK_SET 
)

Definition at line 105 of file stream.cpp.

uint32 Common::MemoryWriteStreamDynamic::size (  )  const [inline]

Definition at line 205 of file memstream.h.

uint32 Common::MemoryWriteStreamDynamic::write ( const void *  dataPtr,
uint32  dataSize 
) [inline, virtual]

Write data into the stream.

Subclasses must implement this method; all other write methods are implemented using it.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C fwrite().
Parameters:
dataPtr pointer to the data to be written
dataSize number of bytes to be written
Returns:
the number of bytes which were actually written.

Implements Common::WriteStream.

Definition at line 194 of file memstream.h.


Member Data Documentation

Definition at line 161 of file memstream.h.

Definition at line 164 of file memstream.h.

Definition at line 165 of file memstream.h.

Definition at line 163 of file memstream.h.

Definition at line 162 of file memstream.h.


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


Generated on Sat Jan 12 2019 05:04:13 for ResidualVM by doxygen 1.7.1
curved edge   curved edge