The bitfield class.
More...
#include <murl_bitfield.h>
◆ Bitfield()
Murl::Bitfield::Bitfield |
( |
| ) |
|
|
inline |
The default constructor.
Create an empty bitfield.
◆ Set()
void Murl::Bitfield::Set |
( |
UInt32 |
bitIndex | ) |
|
|
inline |
Set a bit in the bitfield.
Extends the bitfield if the bitIndex is greater than the current number of bits, new bits are set to zero.
- Parameters
-
bitIndex | The zero based index of the bit to set. |
◆ Clear()
void Murl::Bitfield::Clear |
( |
UInt32 |
bitIndex | ) |
|
|
inline |
Clear a bit in the bitfield.
Extends the bitfield if the bitIndex is greater than the current number of bits, new bits are set to zero.
- Parameters
-
bitIndex | The zero based index of the bit to clear. |
◆ IsSet()
Bool Murl::Bitfield::IsSet |
( |
UInt32 |
bitIndex | ) |
const |
|
inline |
Check if a bit is set in the bitfield.
- Parameters
-
bitIndex | The zero based index of the bit to test. |
- Returns
- true if the bit is set, false if the index is out of range.
◆ IsCleared()
Bool Murl::Bitfield::IsCleared |
( |
UInt32 |
bitIndex | ) |
const |
|
inline |
Check if a bit is cleared in the bitfield.
- Parameters
-
bitIndex | The zero based index of the bit to test. |
- Returns
- true if the bit is cleared or the index is out of range.
◆ GetBitsCount()
UInt32 Murl::Bitfield::GetBitsCount |
( |
| ) |
const |
|
inline |
Get the number of allocated bits in the bitfield.
- Returns
- The number of allocated bits in the bitfield.
◆ SetBitsCount()
Set the number of bits in the bitfield.
The bitfield is allocated in 32-bit steps, if the bitfield is extended, the new bits are set to zero.
- Parameters
-
numBits | The new number of bits in the bitfield. |
- Returns
- The number of allocated bits in the bitfield.
◆ Begin()
const UInt8* Murl::Bitfield::Begin |
( |
| ) |
const |
|
inline |
Get the pointer to the first bitfield byte.
- Returns
- The pointer to the first bitfield byte.
◆ End()
const UInt8* Murl::Bitfield::End |
( |
| ) |
const |
|
inline |
Get the pointer next to the last bitfield byte.
- Returns
- The pointer next to the last bitfield byte.
◆ GetByteSize()
UInt32 Murl::Bitfield::GetByteSize |
( |
| ) |
const |
|
inline |
Get the byte size of the bitfield.
- Returns
- The number of bytes used by the bitfield.
The documentation for this class was generated from the following file: