Base bit set class for case where actual array is "owned" by something other than the class. More...
#include <mi32/bitset.h>

Classes | |
| class | ITERATOR |
| Iterator to step forward through all selected items in a BITSET. More... | |
Public Member Functions | |
| BITSET_UNOWNED (UINT8 *set, UINT32 NumEntries) | |
| BITSET_UNOWNED () | |
| virtual | ~BITSET_UNOWNED () |
| virtual ERRVALUE | Assign (UINT8 *set, UINT32 NumEntries) |
| ITERATOR | Begin (bool value=true) const |
| void | Clear (UINT32 posn) |
| void | ClearAll () |
| void | ClearRange (UINT32 min, UINT32 max) |
| void | CopyBit (UINT32 DestPosn, UINT32 SourcePosn) |
| INT32 | CountValues (bool value=true) const |
| ITERATOR | End () const |
| bool | GetBit (UINT32 posn) const |
| UINT32 | GetNumEntries () const |
| bool | GetRange (UINT32 StartPosn, UINT32 MaxEnd, UINT32 &EndPosn) const |
| bool | HasEntries () const |
| bool | HasMultiple (bool value) const |
| bool | HasValue (bool value) const |
| void | Invert (UINT32 posn) |
| void | InvertAll () |
| void | InvertRange (UINT32 min, UINT32 max) |
| bool | IsEqual (const BITSET_UNOWNED &rhs) const |
| operator const UINT8 * () const | |
| operator UINT8 * () | |
| BITSET_UNOWNED & | operator&= (const BITSET_UNOWNED &rhs) |
| BITSET_UNOWNED & | operator^= (const BITSET_UNOWNED &rhs) |
| BITSET_UNOWNED & | operator|= (const BITSET_UNOWNED &rhs) |
| void | Set (UINT32 posn) |
| void | SetAll () |
| void | SetBit (UINT32 posn, bool value) |
| void | SetRange (UINT32 min, UINT32 max) |
Protected Attributes | |
| UINT8 * | m_Array |
| UINT32 | m_ArraySize |
| UINT32 | m_NumEntries |
Base bit set class for case where actual array is "owned" by something other than the class.
| BITSET_UNOWNED::BITSET_UNOWNED | ( | ) |
Default constructor.
Constructor to convert old bit-array's into BITSET_UNOWNEDs.
| set | Old bit array set | |
| NumEntries | Number of items in old bit array, not size in bytes |
| virtual BITSET_UNOWNED::~BITSET_UNOWNED | ( | ) | [virtual] |
Destructor.
Assign from old type bit arrays.
| set | Pointer to old bit-array | |
| NumEntries | Number of items in old bit array |
Reimplemented in BITSET, and BITSET_SHARED.
| ITERATOR BITSET_UNOWNED::Begin | ( | bool | value = true |
) | const [inline] |
Initialize iterator with first set or unset item in the bit set.
Returns iterator to first set entry, otherwise the last+1 item if no matching item.
| value | Value to iterate through |
| void BITSET_UNOWNED::Clear | ( | UINT32 | posn | ) | [inline] |
Clear value at specified position.
| void BITSET_UNOWNED::ClearAll | ( | ) | [inline] |
Clear bit array with false.
Makes all the entries in the bit set 'false'.
Transfer value from source to dest entry.
Replaces putbit(set, DestPosn, getbit(set, SourcePosn)).
| DestPosn | where setting goes to | |
| SourcePosn | where setting comes from |
| INT32 BITSET_UNOWNED::CountValues | ( | bool | value = true |
) | const |
Count the values in the set.
Iterates through the set, so should not be used in time-critical code.
| ITERATOR BITSET_UNOWNED::End | ( | ) | const [inline] |
Initialize iterator with last+1 item in the bit set.
Returns iterator to last+1 item
| bool BITSET_UNOWNED::GetBit | ( | UINT32 | posn | ) | const [inline] |
Retrieve value at the requested position, true or false.
Returns 'false' if the position given is outside the range of the BITSET
| posn | position where value is retrieved from |
| UINT32 BITSET_UNOWNED::GetNumEntries | ( | ) | const [inline] |
Return the number of valid entries.
Get a range of entries that are set continuously in the bitset.
| StartPosn | Staring position | |
| MaxEnd | Maximum ending position | |
| EndPosn | Ending position (inclusive) RETURNED |
| bool BITSET_UNOWNED::HasEntries | ( | ) | const [inline] |
Does bit set have any entries?
| bool BITSET_UNOWNED::HasMultiple | ( | bool | value | ) | const |
Determine if has multiple entries with specified value.
| bool BITSET_UNOWNED::HasValue | ( | bool | value | ) | const [inline] |
Determine if has at least one entry with specified value;.
| void BITSET_UNOWNED::Invert | ( | UINT32 | posn | ) | [inline] |
Invert value at specified position.
| posn | Position to be inverted |
| void BITSET_UNOWNED::InvertAll | ( | ) |
Invert all entries in bit set.
| bool BITSET_UNOWNED::IsEqual | ( | const BITSET_UNOWNED & | rhs | ) | const |
Determine if 'this' and 'rhs' are equal.
If the number of entries is different, and the range where entries are shared are the same, will check the extended entries to see if all of its entries are false, if so, will return 'true'. This is equivalent to this code snippet:
UINT32 MaxEntries = MAX(GetNumEntries(), rhs.GetNumEntries()); for (UINT32 q = 0;(q < MaxEntries);++q) { if (GetBit(q) != rhs.GetBit(q)) return (false); } return (true);
| BITSET_UNOWNED::operator const UINT8 * | ( | ) | const [inline] |
Conversion to old bit-array style for legacy code.
| BITSET_UNOWNED::operator UINT8 * | ( | ) | [inline] |
Conversion to old bit-array style for legacy code.
| BITSET_UNOWNED& BITSET_UNOWNED::operator&= | ( | const BITSET_UNOWNED & | rhs | ) |
Bitwise AND.
If the bit sets are not the same size the set will be unaltered.
| BITSET_UNOWNED& BITSET_UNOWNED::operator^= | ( | const BITSET_UNOWNED & | rhs | ) |
Bitwise XOR.
If the bit sets are not the same size the set will be unaltered.
| BITSET_UNOWNED& BITSET_UNOWNED::operator|= | ( | const BITSET_UNOWNED & | rhs | ) |
Bitwise OR.
If the bit sets are not the same size the set will be unaltered.
| void BITSET_UNOWNED::Set | ( | UINT32 | posn | ) | [inline] |
Set a value at the requested position to "true".
Does nothing if the position given is outside range.
| posn | Position to set |
| void BITSET_UNOWNED::SetAll | ( | ) |
Set all entries to true, opposite of ClearAll().
Turn all bit positions to true.
| void BITSET_UNOWNED::SetBit | ( | UINT32 | posn, | |
| bool | value | |||
| ) | [inline] |
Set a value at the requested position, true or false.
Does nothing if the position given is outside range.
| posn | Position where value is set | |
| value | Value to be set at position |
UINT8* BITSET_UNOWNED::m_Array [protected] |
Placed here so that ITERATOR class can have access to them.
Memory containing the bit array
UINT32 BITSET_UNOWNED::m_ArraySize [protected] |
Array size in bytes.
UINT32 BITSET_UNOWNED::m_NumEntries [protected] |
Actual number of bits used.
1.6.1