#include <UT_BitArray.h>
Public Member Functions | |
| UT_BitArray () | |
| UT_BitArray (const UT_BitArray &src) | |
| UT_BitArray (int size) | |
| ~UT_BitArray () | |
| void | insert (int index, bool value) |
| void | append (bool value) |
| void | remove (int index) |
| void | resize (int size) |
| int | getSize () const |
| int | numBitsSet () const |
| int | numBitsClear () const |
| int | allBitsSet () const |
| int | allBitsClear () const |
| bool | getBit (int index) const |
| bool | setBit (int index, bool value) |
| bool | toggleBit (int index) |
| void | setBits (int index, int nbits, bool value) |
| void | toggleBits (int index, int nbits) |
| void | setAllBits (bool value) |
| void | toggleAllBits () |
| int | save (ostream &os, int binary=0) const |
| bool | load (UT_IStream &is) |
| int | findFirstBit () const |
| int | findLastBit () const |
| int | operator() (int index) const |
| int | operator[] (int index) const |
| UT_BitArray & | operator&= (const UT_BitArray &inMap) |
| UT_BitArray & | operator|= (const UT_BitArray &inMap) |
| UT_BitArray & | operator^= (const UT_BitArray &inMap) |
| UT_BitArray & | operator-= (const UT_BitArray &inMap) |
| UT_BitArray & | operator= (const UT_BitArray &inMap) |
| unsigned | operator== (const UT_BitArray &inMap) const |
| bool | intersects (const UT_BitArray &inMap) const |
| Returns whether there are any intersections between the two arrays. | |
| int64 | getMemoryUsage () const |
| uint | computeHash () const |
| void | iterateInit (int ¤tBit) const |
| int | iterateNext (int currentBit) const |
Definition at line 32 of file UT_BitArray.h.
| UT_BitArray::UT_BitArray | ( | ) |
| UT_BitArray::UT_BitArray | ( | const UT_BitArray & | src | ) |
| UT_BitArray::UT_BitArray | ( | int | size | ) | [explicit] |
| UT_BitArray::~UT_BitArray | ( | ) |
| int UT_BitArray::allBitsClear | ( | ) | const |
| int UT_BitArray::allBitsSet | ( | ) | const |
| void UT_BitArray::append | ( | bool | value | ) | [inline] |
Definition at line 40 of file UT_BitArray.h.
| uint UT_BitArray::computeHash | ( | ) | const |
| int UT_BitArray::findFirstBit | ( | ) | const |
Find first or last bit in the array. The functions will return -1 if no bits are set (i.e. equivalent to allBitsClear())
| int UT_BitArray::findLastBit | ( | ) | const |
| bool UT_BitArray::getBit | ( | int | index | ) | const |
| int64 UT_BitArray::getMemoryUsage | ( | void | ) | const [inline] |
Definition at line 95 of file UT_BitArray.h.
| int UT_BitArray::getSize | ( | void | ) | const [inline] |
Definition at line 44 of file UT_BitArray.h.
| void UT_BitArray::insert | ( | int | index, | |
| bool | value | |||
| ) |
| bool UT_BitArray::intersects | ( | const UT_BitArray & | inMap | ) | const |
Returns whether there are any intersections between the two arrays.
| void UT_BitArray::iterateInit | ( | int & | currentBit | ) | const |
Iterate over set bits
eg. for (bits.iterateInit(i); i >= 0; i = bits.iterateNext(i)) ... do something with bits(i)
| int UT_BitArray::iterateNext | ( | int | currentBit | ) | const |
Iterate over set bits
eg. for (bits.iterateInit(i); i >= 0; i = bits.iterateNext(i)) ... do something with bits(i)
| bool UT_BitArray::load | ( | UT_IStream & | is | ) |
| int UT_BitArray::numBitsClear | ( | ) | const |
| int UT_BitArray::numBitsSet | ( | ) | const |
| UT_BitArray& UT_BitArray::operator&= | ( | const UT_BitArray & | inMap | ) |
| int UT_BitArray::operator() | ( | int | index | ) | const [inline] |
Definition at line 83 of file UT_BitArray.h.
| UT_BitArray& UT_BitArray::operator-= | ( | const UT_BitArray & | inMap | ) |
| UT_BitArray& UT_BitArray::operator= | ( | const UT_BitArray & | inMap | ) |
| unsigned UT_BitArray::operator== | ( | const UT_BitArray & | inMap | ) | const |
| int UT_BitArray::operator[] | ( | int | index | ) | const [inline] |
Definition at line 84 of file UT_BitArray.h.
| UT_BitArray& UT_BitArray::operator^= | ( | const UT_BitArray & | inMap | ) |
| UT_BitArray& UT_BitArray::operator|= | ( | const UT_BitArray & | inMap | ) |
| void UT_BitArray::remove | ( | int | index | ) |
| void UT_BitArray::resize | ( | int | size | ) |
| int UT_BitArray::save | ( | ostream & | os, | |
| int | binary = 0 | |||
| ) | const |
| void UT_BitArray::setAllBits | ( | bool | value | ) |
| bool UT_BitArray::setBit | ( | int | index, | |
| bool | value | |||
| ) |
| void UT_BitArray::setBits | ( | int | index, | |
| int | nbits, | |||
| bool | value | |||
| ) |
| void UT_BitArray::toggleAllBits | ( | ) |
| bool UT_BitArray::toggleBit | ( | int | index | ) |
| void UT_BitArray::toggleBits | ( | int | index, | |
| int | nbits | |||
| ) |
1.5.9