BitVector Class Reference

#include <bitVector.h>

List of all members.


Detailed Description

Manage a vector of bits of arbitrary size.


Public Member Functions

 BitVector ()
 BitVector (const U32 _size)
 ~BitVector ()
bool copy (const BitVector &from)
Size Management
void setSize (const U32 _size)
U32 getSize () const
U32 getByteSize () const
U32 getAllocatedByteSize () const
const U8getBits () const
U8getNCBits ()
Mutators
Note that bits are specified by index, unlike BitSet32.

void clear ()
 Clear all the bits.
void set ()
 Set all the bits.
void set (U32 bit)
 Set the specified bit.
void clear (U32 bit)
 Clear the specified bit.
bool test (U32 bit) const
 Test that the specified bit is set.

Static Private Member Functions

static U32 calcByteSize (const U32 numBits)

Private Attributes

U8mBits
U32 mByteSize
U32 mSize


Constructor & Destructor Documentation

BitVector::BitVector (  )  [inline]

BitVector::BitVector ( const U32  _size  )  [inline]

BitVector::~BitVector (  )  [inline]


Member Function Documentation

U32 BitVector::calcByteSize ( const U32  numBits  )  [inline, static, private]

void BitVector::setSize ( const U32  _size  )  [inline]

U32 BitVector::getSize (  )  const [inline]

U32 BitVector::getByteSize (  )  const [inline]

U32 BitVector::getAllocatedByteSize (  )  const [inline]

const U8* BitVector::getBits (  )  const [inline]

U8* BitVector::getNCBits (  )  [inline]

bool BitVector::copy ( const BitVector from  )  [inline]

void BitVector::clear (  )  [inline]

Clear all the bits.

void BitVector::set (  )  [inline]

Set all the bits.

void BitVector::set ( U32  bit  )  [inline]

Set the specified bit.

void BitVector::clear ( U32  bit  )  [inline]

Clear the specified bit.

bool BitVector::test ( U32  bit  )  const [inline]

Test that the specified bit is set.


Member Data Documentation

U8* BitVector::mBits [private]

U32 BitVector::mSize [private]