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

Common::BitStreamMemoryStream Class Reference

A cut-down version of MemoryReadStream specifically for use with BitStream. More...

#include <bitstream.h>

List of all members.

Public Member Functions

 BitStreamMemoryStream (const byte *dataPtr, uint32 dataSize, DisposeAfterUse::Flag disposeMemory=DisposeAfterUse::NO)
 ~BitStreamMemoryStream ()
bool eos () const
bool err () const
int32 pos () const
int32 size () const
bool seek (uint32 offset)
byte readByte ()
uint16 readUint16LE ()
uint16 readUint16BE ()
uint32 readUint32LE ()
uint32 readUint32BE ()

Private Attributes

const byte *const _ptrOrig
const byte_ptr
const uint32 _size
uint32 _pos
DisposeAfterUse::Flag _disposeMemory
bool _eos

Detailed Description

A cut-down version of MemoryReadStream specifically for use with BitStream.

It removes the virtual call overhead for reading bytes from a memory buffer, and allows directly inlining this access.

The code duplication with MemoryReadStream is not ideal. It might be possible to avoid this by making this a final subclass of MemoryReadStream, but that is a C++11 feature.

Definition at line 288 of file bitstream.h.


Constructor & Destructor Documentation

Common::BitStreamMemoryStream::BitStreamMemoryStream ( const byte dataPtr,
uint32  dataSize,
DisposeAfterUse::Flag  disposeMemory = DisposeAfterUse::NO 
) [inline]

Definition at line 298 of file bitstream.h.

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

Definition at line 306 of file bitstream.h.


Member Function Documentation

bool Common::BitStreamMemoryStream::eos (  )  const [inline]

Definition at line 311 of file bitstream.h.

bool Common::BitStreamMemoryStream::err (  )  const [inline]

Definition at line 315 of file bitstream.h.

int32 Common::BitStreamMemoryStream::pos (  )  const [inline]

Definition at line 319 of file bitstream.h.

byte Common::BitStreamMemoryStream::readByte (  )  [inline]

Definition at line 336 of file bitstream.h.

uint16 Common::BitStreamMemoryStream::readUint16BE (  )  [inline]

Definition at line 365 of file bitstream.h.

uint16 Common::BitStreamMemoryStream::readUint16LE (  )  [inline]

Definition at line 346 of file bitstream.h.

uint32 Common::BitStreamMemoryStream::readUint32BE (  )  [inline]

Definition at line 402 of file bitstream.h.

uint32 Common::BitStreamMemoryStream::readUint32LE (  )  [inline]

Definition at line 384 of file bitstream.h.

bool Common::BitStreamMemoryStream::seek ( uint32  offset  )  [inline]

Definition at line 327 of file bitstream.h.

int32 Common::BitStreamMemoryStream::size (  )  const [inline]

Definition at line 323 of file bitstream.h.


Member Data Documentation

Definition at line 295 of file bitstream.h.

Definition at line 293 of file bitstream.h.

Definition at line 291 of file bitstream.h.

Definition at line 290 of file bitstream.h.

Definition at line 292 of file bitstream.h.


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


Generated on Sat Jul 13 2019 05:03:36 for ResidualVM by doxygen 1.7.1
curved edge   curved edge