awUtil.BitField acts as an array of booleans with a preset size.
You have to manually set the size and resizing it will reset the values back to false.
Public Member Functions |
|
| __init__ () | |
| __init__ (int sizeInBits) | |
| __del__ () | |
| __init__ (BitField) | |
| BitField | operator= (BitField) |
| resizeAndReset (int) | |
| int | maxAvailableBits () |
| Return the number of bits that are
available. |
|
| resetAll () | |
| setAll () | |
| BitRef | operator[] (int) |
| Index operator that returns a reference
appropriate for LHS usage. |
|
| bool | operator[] (int) |
| Constant version of the index operator
behaving as testBit(i). |
|
| bool | operator== (BitField) |
| bool | operator!= (BitField) |
| Not-equals operator uses the operator== to
reduce code duplication. |
|
| BitField | setBit (int, bool) |
| bool | testBit (int) |
| Return true if the bit is set, false
otherwise. |
|
| int | numBitsSet () |
| Return the number of bits set to true.
|
|
| bool | anySet () |
| Return true if any of the bits are set to
true, false otherwise. |
|
| bool | allSet () |
| Return true if all of the bits are set to
true, false otherwise. |
|
| BitField | operator~ () |
| BitField | operator^ (BitField mask) |
| BitField | operator& (BitField mask) |
| BitField | operator| (BitField mask) |
| BitField | operator^= (BitField mask) |
| BitField | operator&= (BitField mask) |
| BitField | operator|= (BitField mask) |
| awUtil.BitField.__init__ | ( | ) |
| awUtil.BitField.__init__ | ( | int | sizeInBits | ) |
| awUtil.BitField.__del__ | ( | ) |
| awUtil.BitField.__init__ | ( | BitField | ) |
| awUtil.BitField.resizeAndReset | ( | int | ) |
| int awUtil.BitField.maxAvailableBits | ( | ) |
Return the number of bits that are available.
| awUtil.BitField.resetAll | ( | ) |
| awUtil.BitField.setAll | ( | ) |
| BitRef awUtil.BitField.operator[] | ( | int | ) |
Index operator that returns a reference appropriate for LHS usage.
This is why you can do "bits[8] = true;" or something like that.
| bool awUtil.BitField.operator[] | ( | int | ) |
Constant version of the index operator behaving as testBit(i).
| bool awUtil.BitField.operator== | ( | BitField | ) |
| bool awUtil.BitField.operator!= | ( | BitField | ) |
Not-equals operator uses the operator== to reduce code duplication.
| BitField awUtil.BitField.setBit | ( | int | , |
| bool | |||
| ) |
| bool awUtil.BitField.testBit | ( | int | ) |
Return true if the bit is set, false otherwise.
Make sure that the argument is in range.
| int awUtil.BitField.numBitsSet | ( | ) |
Return the number of bits set to true.
| bool awUtil.BitField.anySet | ( | ) |
Return true if any of the bits are set to true, false otherwise.
| bool awUtil.BitField.allSet | ( | ) |
Return true if all of the bits are set to true, false otherwise.
| BitField awUtil.BitField.operator~ | ( | ) |