BitString< N > Class Template Reference
#include <bitstring.h>
List of all members.
Public Member Functions |
| | BitString (void) |
| void | clear (void) |
| int | allocate (int length, int alignment) |
| void | free (int bitPos, int length) |
| int | firstAfter (const int index) const |
| bool | get (const int index) const |
| void | set (const int index) |
| void | reset (const int index) |
| unsigned long | operator() (int index) |
Private Types |
| enum | { BITS_PER_ULONG = 32
} |
| enum | { SHIFTS_PER_ULONG = 5
} |
| enum | { ALL_ALLOCATED = (unsigned long) -1
} |
| enum | { MAX_BITS = (N + BITS_PER_ULONG - 1) & ~(BITS_PER_ULONG - 1)
} |
| enum | { NUM_ULONGS = MAX_BITS / BITS_PER_ULONG
} |
Static Private Member Functions |
| static int | lsb (unsigned long b) |
Private Attributes |
| unsigned long | B [NUM_ULONGS] |
| int | firstPos |
| | The first set position.
|
template<int N>
class BitString< N >
Member Enumeration Documentation
Constructor & Destructor Documentation
Member Function Documentation
template<int N>
| int BitString< N >::allocate |
( |
int |
length, |
|
|
int |
alignment | |
|
) |
| | [inline] |
template<int N>
| int BitString< N >::firstAfter |
( |
const int |
index |
) |
const [inline] |
template<int N>
| void BitString< N >::free |
( |
int |
bitPos, |
|
|
int |
length | |
|
) |
| | [inline] |
template<int N>
| bool BitString< N >::get |
( |
const int |
index |
) |
const [inline] |
template<int N>
| static int BitString< N >::lsb |
( |
unsigned long |
b |
) |
[inline, static, private] |
template<int N>
| unsigned long BitString< N >::operator() |
( |
int |
index |
) |
[inline] |
template<int N>
| void BitString< N >::reset |
( |
const int |
index |
) |
[inline] |
template<int N>
| void BitString< N >::set |
( |
const int |
index |
) |
[inline] |
Member Data Documentation
template<int N>
unsigned long BitString< N >::B[NUM_ULONGS] [private] |
The documentation for this class was generated from the following file: