![]() |
Public API Reference |
#include <bitarray.h>
Public Methods | |
csBitArray (unsigned size) | |
construct with size bits. More... | |
csBitArray (const csBitArray &that) | |
construct as duplicate of that . More... | |
virtual | ~csBitArray () |
destructor. More... | |
csBitArray & | operator= (const csBitArray &that) |
copy from other array. More... | |
BitProxy | operator[] (unsigned pos) |
return bit at position pos . More... | |
const BitProxy | operator[] (unsigned pos) const |
return bit at position pos . More... | |
bool | operator== (const csBitArray &that) const |
equal to other array. More... | |
bool | operator!= (const csBitArray &that) const |
not equal to other array. More... | |
csBitArray & | operator &= (const csBitArray &that) |
bit-wise and. More... | |
csBitArray | operator|= (const csBitArray &that) |
bit-wise or. More... | |
csBitArray | operator^= (const csBitArray &that) |
bit-wise xor. More... | |
csBitArray | operator~ () const |
Flip all bits. More... | |
void | Clear () |
Set all bits to false. More... | |
void | SetBit (unsigned pos) |
Set the bit at position pos to true. More... | |
void | ClearBit (unsigned pos) |
Set the bit at position pos to false. More... | |
void | FlipBit (unsigned pos) |
Toggle the bit at position pos. More... | |
void | Set (unsigned pos, bool val) |
Set the bit at position pos to the given value. More... | |
bool | IsBitSet (unsigned pos) const |
Returns true iff the bit at position pos is true. More... | |
bool | AllBitsFalse () const |
Returns true iff all bits are false. More... | |
csBitArray & | FlipAllBits () |
Change value of all bits. More... | |
store_type * | GetArrayBits () |
return the full array. More... | |
unsigned | GetSingleWord () |
Gets quick access to the single-word (only useful when the bit array <= the word size of the machine.). More... | |
void | SetSingleWord (unsigned w) |
Sets the single-word very simply (only useful when the bit array <= the word size of the machine.). More... | |
Friends | |
csBitArray | operator & (const csBitArray &a1, const csBitArray &a2) |
bit-wise and. More... | |
csBitArray | operator| (const csBitArray &a1, const csBitArray &a2) |
bit-wise or. More... | |
csBitArray | operator^ (const csBitArray &a1, const csBitArray &a2) |
bit-wise xor. More... |
Definition at line 15 of file bitarray.h.
|
construct with
Definition at line 113 of file bitarray.h. Referenced by operator~. |
|
construct as duplicate of
Definition at line 121 of file bitarray.h. |
|
destructor.
Definition at line 128 of file bitarray.h. |
|
Returns true iff all bits are false.
Definition at line 281 of file bitarray.h. |
|
Set all bits to false.
Definition at line 241 of file bitarray.h. |
|
Set the bit at position pos to false.
Definition at line 254 of file bitarray.h. Referenced by Set. |
|
Change value of all bits.
Definition at line 290 of file bitarray.h. |
|
Toggle the bit at position pos.
Definition at line 261 of file bitarray.h. |
|
return the full array.
Definition at line 300 of file bitarray.h. |
|
Gets quick access to the single-word (only useful when the bit array <= the word size of the machine.).
Definition at line 306 of file bitarray.h. |
|
Returns true iff the bit at position pos is true.
Definition at line 274 of file bitarray.h. |
|
bit-wise and.
Definition at line 186 of file bitarray.h. |
|
not equal to other array.
Definition at line 180 of file bitarray.h. |
|
copy from other array.
Definition at line 139 of file bitarray.h. |
|
equal to other array.
Definition at line 168 of file bitarray.h. |
|
return bit at position
Definition at line 161 of file bitarray.h. |
|
return bit at position
Definition at line 154 of file bitarray.h. |
|
bit-wise xor.
Definition at line 204 of file bitarray.h. |
|
bit-wise or.
Definition at line 195 of file bitarray.h. |
|
Flip all bits.
Definition at line 213 of file bitarray.h. References csBitArray. |
|
Set the bit at position pos to the given value.
Definition at line 268 of file bitarray.h. |
|
Set the bit at position pos to true.
Definition at line 247 of file bitarray.h. Referenced by Set. |
|
Sets the single-word very simply (only useful when the bit array <= the word size of the machine.).
Definition at line 312 of file bitarray.h. |
|
bit-wise and.
Definition at line 219 of file bitarray.h. |
|
bit-wise xor.
Definition at line 231 of file bitarray.h. |
|
bit-wise or.
Definition at line 225 of file bitarray.h. |