ScummVM API documentation
Common::BitStreamMemoryStream Class Reference

#include <bitstream.h>

Public Member Functions

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

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.

Constructor & Destructor Documentation

◆ BitStreamMemoryStream()

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


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