BITSET_UNOWNED Class Reference

Base bit set class for case where actual array is "owned" by something other than the class. More...

#include <mi32/bitset.h>

Inheritance diagram for BITSET_UNOWNED:

Inheritance graph
BITSETBITSET_SHARED
[legend]
List of all members.

Public Member Functions

virtual ERRVALUE Assign (UINT8 *set, UINT32 NumEntries)
ITERATOR Begin (bool value=true) const
 BITSET_UNOWNED (UINT8 *set, UINT32 NumEntries)
 BITSET_UNOWNED ()
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)
BITSET_UNOWNEDoperator &= (const BITSET_UNOWNED &rhs)
 operator const UINT8 * () const
 operator UINT8 * ()
BITSET_UNOWNEDoperator^= (const BITSET_UNOWNED &rhs)
BITSET_UNOWNEDoperator|= (const BITSET_UNOWNED &rhs)
void Set (UINT32 posn)
void SetAll ()
void SetBit (UINT32 posn, bool value)
void SetRange (UINT32 min, UINT32 max)
virtual ~BITSET_UNOWNED ()

Protected Attributes

UINT8m_Array
UINT32 m_ArraySize
UINT32 m_NumEntries

Classes

class  ITERATOR
 Iterator to step forward through all selected items in a BITSET. More...

Detailed Description

Base bit set class for case where actual array is "owned" by something other than the class.

Definition at line 190 of file bitset.h.


Constructor & Destructor Documentation

BITSET_UNOWNED::BITSET_UNOWNED (  ) 

Default constructor.

BITSET_UNOWNED::BITSET_UNOWNED ( UINT8 set,
UINT32  NumEntries 
)

Constructor to convert old bit-array's into BITSET_UNOWNEDs.

Parameters:
set  Old bit array set
NumEntries  Number of items in old bit array, not size in bytes

virtual BITSET_UNOWNED::~BITSET_UNOWNED (  )  [virtual]

Destructor.


Member Function Documentation

virtual ERRVALUE BITSET_UNOWNED::Assign ( UINT8 set,
UINT32  NumEntries 
) [virtual]

Assign from old type bit arrays.

Parameters:
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.

Parameters:
value  Value to iterate through

Definition at line 325 of file bitset.h.

void BITSET_UNOWNED::Clear ( UINT32  posn  )  [inline]

Clear value at specified position.

Definition at line 332 of file bitset.h.

void BITSET_UNOWNED::ClearAll (  )  [inline]

Clear bit array with false.

Makes all the entries in the bit set 'false'.

Definition at line 343 of file bitset.h.

void BITSET_UNOWNED::ClearRange ( UINT32  min,
UINT32  max 
)

Set range of entries to "false".

void BITSET_UNOWNED::CopyBit ( UINT32  DestPosn,
UINT32  SourcePosn 
)

Transfer value from source to dest entry.

Replaces putbit(set, DestPosn, getbit(set, SourcePosn)).

Parameters:
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

Definition at line 370 of file bitset.h.

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

Parameters:
posn  position where value is retrieved from

Definition at line 377 of file bitset.h.

UINT32 BITSET_UNOWNED::GetNumEntries (  )  const [inline]

Return the number of valid entries.

Definition at line 385 of file bitset.h.

bool BITSET_UNOWNED::GetRange ( UINT32  StartPosn,
UINT32  MaxEnd,
UINT32 EndPosn 
) const

Get a range of entries that are set continuously in the bitset.

Returns:
'True' if a true range, 'false' if a false range
Parameters:
StartPosn  Staring position
MaxEnd  Maximum ending position
EndPosn  Ending position (inclusive) RETURNED

bool BITSET_UNOWNED::HasEntries (  )  const [inline]

Does bit set have any entries?

Definition at line 399 of file bitset.h.

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;.

Definition at line 410 of file bitset.h.

void BITSET_UNOWNED::Invert ( UINT32  posn  )  [inline]

Invert value at specified position.

Parameters:
posn  Position to be inverted

Definition at line 415 of file bitset.h.

void BITSET_UNOWNED::InvertAll (  ) 

Invert all entries in bit set.

void BITSET_UNOWNED::InvertRange ( UINT32  min,
UINT32  max 
)

Set range of entries to inverse.

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::operator const UINT8 * (  )  const [inline]

Conversion to old bit-array style for legacy code.

Definition at line 294 of file bitset.h.

BITSET_UNOWNED::operator UINT8 * (  )  [inline]

Conversion to old bit-array style for legacy code.

Definition at line 288 of file bitset.h.

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.

Parameters:
posn  Position to set

Definition at line 435 of file bitset.h.

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.

Parameters:
posn  Position where value is set
value  Value to be set at position

Definition at line 451 of file bitset.h.

void BITSET_UNOWNED::SetRange ( UINT32  min,
UINT32  max 
)

Set range of entries to "true".


Member Data Documentation

UINT8* BITSET_UNOWNED::m_Array [protected]

Placed here so that ITERATOR class can have access to them Memory containing the bit array.

Definition at line 193 of file bitset.h.

UINT32 BITSET_UNOWNED::m_ArraySize [protected]

Array size in bytes.

Definition at line 195 of file bitset.h.

UINT32 BITSET_UNOWNED::m_NumEntries [protected]

Actual number of bits used.

Definition at line 194 of file bitset.h.


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 04:11:00 2007 for TNTsdk by  doxygen 1.5.2