live
Public Member Functions | Private Attributes
BitVector Class Reference

#include <BitVector.hh>

Public Member Functions

 BitVector (unsigned char *baseBytePtr, unsigned baseBitOffset, unsigned totNumBits)
 
void setup (unsigned char *baseBytePtr, unsigned baseBitOffset, unsigned totNumBits)
 
void putBits (unsigned from, unsigned numBits)
 
void put1Bit (unsigned bit)
 
unsigned getBits (unsigned numBits)
 
unsigned get1Bit ()
 
Boolean get1BitBoolean ()
 
void skipBits (unsigned numBits)
 
unsigned curBitIndex () const
 
unsigned totNumBits () const
 
unsigned numBitsRemaining () const
 
unsigned get_expGolomb ()
 
int get_expGolombSigned ()
 

Private Attributes

unsigned char * fBaseBytePtr
 
unsigned fBaseBitOffset
 
unsigned fTotNumBits
 
unsigned fCurBitIndex
 

Detailed Description

Definition at line 28 of file BitVector.hh.

Constructor & Destructor Documentation

◆ BitVector()

BitVector::BitVector ( unsigned char *  baseBytePtr,
unsigned  baseBitOffset,
unsigned  totNumBits 
)

Member Function Documentation

◆ curBitIndex()

unsigned BitVector::curBitIndex ( ) const
inline

Definition at line 47 of file BitVector.hh.

47 { return fCurBitIndex; }
unsigned fCurBitIndex
Definition: BitVector.hh:59

References fCurBitIndex.

◆ get1Bit()

unsigned BitVector::get1Bit ( )

◆ get1BitBoolean()

Boolean BitVector::get1BitBoolean ( )
inline

Definition at line 43 of file BitVector.hh.

43 { return get1Bit() != 0; }
unsigned get1Bit()

References get1Bit().

◆ get_expGolomb()

unsigned BitVector::get_expGolomb ( )

◆ get_expGolombSigned()

int BitVector::get_expGolombSigned ( )

◆ getBits()

unsigned BitVector::getBits ( unsigned  numBits)

Referenced by MP3FrameParams::getBits().

◆ numBitsRemaining()

unsigned BitVector::numBitsRemaining ( ) const
inline

Definition at line 49 of file BitVector.hh.

49 { return fTotNumBits - fCurBitIndex; }
unsigned fTotNumBits
Definition: BitVector.hh:58

References fCurBitIndex, and fTotNumBits.

◆ put1Bit()

void BitVector::put1Bit ( unsigned  bit)

◆ putBits()

void BitVector::putBits ( unsigned  from,
unsigned  numBits 
)

◆ setup()

void BitVector::setup ( unsigned char *  baseBytePtr,
unsigned  baseBitOffset,
unsigned  totNumBits 
)

◆ skipBits()

void BitVector::skipBits ( unsigned  numBits)

◆ totNumBits()

unsigned BitVector::totNumBits ( ) const
inline

Definition at line 48 of file BitVector.hh.

48 { return fTotNumBits; }

References fTotNumBits.

Field Documentation

◆ fBaseBitOffset

unsigned BitVector::fBaseBitOffset
private

Definition at line 57 of file BitVector.hh.

◆ fBaseBytePtr

unsigned char* BitVector::fBaseBytePtr
private

Definition at line 56 of file BitVector.hh.

◆ fCurBitIndex

unsigned BitVector::fCurBitIndex
private

Definition at line 59 of file BitVector.hh.

Referenced by curBitIndex(), and numBitsRemaining().

◆ fTotNumBits

unsigned BitVector::fTotNumBits
private

Definition at line 58 of file BitVector.hh.

Referenced by numBitsRemaining(), and totNumBits().


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