In file bitarray.hpp:

class BitArray

A compressed array of bools.

Documentation

A compressed array of bools.

Provides bit-operations and whole array operations.


Public Methods

[more] BitArray()
empty array
[more] BitArray(int asize)
array of asize bits
[more] BitArray(const BitArray & ba2)
[more] ~BitArray()
delete data
[more]void SetSize(int asize)
Set size, loose values
[more]int Size() const
the size
[more]void Set()
set all bits
[more]void Clear()
clear all bits
[more]void Set(int i)
set bit i
[more]void Clear(int i)
clear bit i
[more]inline bool Test(int i) const
check bit i
[more]BitArray& operator= (bool b)
set all bits to b
[more]bool operator[] (int i) const
check bit i
[more]void Invert()
invert all bits
[more]void And(const BitArray & ba2)
logical AND with ba2
[more]void Or(const BitArray & ba2)
logical OR with ba2
[more]BitArray& operator= (const BitArray & ba2)
copy from ba2

Private Fields

[more]int size
number of bits
[more]unsigned char* data
the data

Private Methods

[more]unsigned char Mask(int i) const
[more]inline int Addr(int i) const

oint size
number of bits

ounsigned char* data
the data

o BitArray()
empty array

o BitArray(int asize)
array of asize bits

o BitArray(const BitArray & ba2)

o ~BitArray()
delete data

ovoid SetSize(int asize)
Set size, loose values

oint Size() const
the size

ovoid Set()
set all bits

ovoid Clear()
clear all bits

ovoid Set(int i)
set bit i

ovoid Clear(int i)
clear bit i

oinline bool Test(int i) const
check bit i

oBitArray& operator= (bool b)
set all bits to b

obool operator[] (int i) const
check bit i

ovoid Invert()
invert all bits

ovoid And(const BitArray & ba2)
logical AND with ba2

ovoid Or(const BitArray & ba2)
logical OR with ba2

oBitArray& operator= (const BitArray & ba2)
copy from ba2

ounsigned char Mask(int i) const

oinline int Addr(int i) const


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.