SECBitArray Class
class SECBitArray
The SECBitArray class implements a boolean array utilizing the individual bits of a DWORD array to represent each boolean value in the array.Defined in: SECBitmapArray.h
Comments
To use the SECBitArray class, create an instance of the class, passing the number of bit elements in the array to the constructor. All of the elements are initially set to FALSE. To set or get the value of a particular bit, call SetBit and GetBit.Developer Notes
SECBitArray is not a growable array class. The size of the array is set at construction and remains fixed throughout the lifetime of the object.Class Template Arguments
ArraySize_T
The maximum number of bits for the array.
DataType_T
The data type used to make up the array (e.g., DWORD, etc.)
Class Members
Creation / initialization
Constructor.
Public attributes
static unsigned int GetUpperBound()
The upper bound of the bit array.
static unsigned int GetBitStorageElementCount()
The number of elements in the array of data elements that house the bits.
static unsigned int GetBitsPerDataType()
The number of bits per DataType element.
virtual BOOL GetBit(unsigned int nBit) const
Retrieves the value of a specific bit in the array.
virtual void SetBit(unsigned int nBit, BOOL bSet = TRUE)
Sets the state of a specific bit in the array.
BOOL GetArrayBitStates(BOOL bAllSet = FALSE) const
Tests if all bits in the array are set identically.
void ConvertFromChars(LPCTSTR lpszChars)
Set bits that correspond to the given set of characters.
void ConvertToChars(CString& strChars) const
Interpret the bit array as character set flags.
void SetBits(BOOL bSet)
Clears or sets all bits in the array.
Protected attributes
DataType_T BitArray[SECBITARRAY_ELEMENTS(ArraySize_T,DataType_T)]
The array of data elements that house the bits for the bit array