xoreos  0.0.5
Public Member Functions | Protected Member Functions | List of all members
Common::BitStream Class Referenceabstract

A bit stream. More...

#include <bitstream.h>

Inheritance diagram for Common::BitStream:
Inheritance graph
[legend]

Public Member Functions

virtual ~BitStream ()
 
virtual size_t pos () const =0
 Return the stream position in bits. More...
 
virtual size_t size () const =0
 Return the stream size in bits. More...
 
virtual bool eos () const =0
 Has the end of the stream been reached? More...
 
virtual void rewind ()=0
 Rewind the bit stream back to the start. More...
 
virtual void skip (size_t n)=0
 Skip the specified amount of bits. More...
 
virtual uint32 getBit ()=0
 Read a bit from the bit stream. More...
 
virtual uint32 getBits (size_t n)=0
 Read a multi-bit value from the bit stream. More...
 
virtual void addBit (uint32 &x, size_t n)=0
 Add a bit to the n-bit value x, making it an (n+1)-bit value. More...
 

Protected Member Functions

 BitStream ()
 

Detailed Description

A bit stream.

Definition at line 40 of file bitstream.h.

Constructor & Destructor Documentation

◆ ~BitStream()

virtual Common::BitStream::~BitStream ( )
inlinevirtual

Definition at line 42 of file bitstream.h.

◆ BitStream()

Common::BitStream::BitStream ( )
inlineprotected

Definition at line 70 of file bitstream.h.

Member Function Documentation

◆ addBit()

virtual void Common::BitStream::addBit ( uint32 x,
size_t  n 
)
pure virtual

Add a bit to the n-bit value x, making it an (n+1)-bit value.

Implemented in Common::BitStreamImpl< valueBits, isLE, isMSB2LSB >.

Referenced by Common::Huffman::getSymbol().

Here is the caller graph for this function:

◆ eos()

virtual bool Common::BitStream::eos ( ) const
pure virtual

Has the end of the stream been reached?

Implemented in Common::BitStreamImpl< valueBits, isLE, isMSB2LSB >.

◆ getBit()

virtual uint32 Common::BitStream::getBit ( )
pure virtual

◆ getBits()

virtual uint32 Common::BitStream::getBits ( size_t  n)
pure virtual

◆ pos()

virtual size_t Common::BitStream::pos ( ) const
pure virtual

◆ rewind()

virtual void Common::BitStream::rewind ( )
pure virtual

Rewind the bit stream back to the start.

Implemented in Common::BitStreamImpl< valueBits, isLE, isMSB2LSB >.

◆ size()

virtual size_t Common::BitStream::size ( ) const
pure virtual

Return the stream size in bits.

Implemented in Common::BitStreamImpl< valueBits, isLE, isMSB2LSB >.

Referenced by Video::Bink::BinkVideoTrack::decodePacket().

Here is the caller graph for this function:

◆ skip()

virtual void Common::BitStream::skip ( size_t  n)
pure virtual

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