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 318 of file bitstream.h.

Constructor & Destructor Documentation

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

Definition at line 328 of file bitstream.h.

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

Definition at line 336 of file bitstream.h.

Member Function Documentation

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

Definition at line 341 of file bitstream.h.

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

Definition at line 345 of file bitstream.h.

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

Definition at line 349 of file bitstream.h.

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

Definition at line 366 of file bitstream.h.

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

Definition at line 395 of file bitstream.h.

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

Definition at line 376 of file bitstream.h.

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

Definition at line 432 of file bitstream.h.

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

Definition at line 414 of file bitstream.h.

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

Definition at line 357 of file bitstream.h.

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

Definition at line 353 of file bitstream.h.

Member Data Documentation

Definition at line 325 of file bitstream.h.

Definition at line 323 of file bitstream.h.

Definition at line 321 of file bitstream.h.

Definition at line 320 of file bitstream.h.

Definition at line 322 of file bitstream.h.

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

Generated on Sat Mar 16 2019 05:05:31 for ResidualVM by doxygen 1.7.1
curved edge   curved edge