Isle
|
Templated fixed-size bitset for bit manipulation. More...
#include <mxbitset.h>
Classes | |
class | Reference |
Proxy class to reference a single bit within the MxBitset. More... | |
Public Member Functions | |
MxBitset () | |
Constructs an empty MxBitset with all bits cleared. More... | |
Reference | operator[] (size_t p_bit) |
Provides a reference-like object for a specific bit. More... | |
MxBitset< N > & | Flip (size_t p_bit) |
Flips (toggles) a single bit at the given position. More... | |
size_t | Count () |
Counts the number of set bits. More... | |
bool | Test (MxU32 p_bit) |
Tests if the given bit is set (1) or not (0). More... | |
MxU32 | Size () const |
Returns the number of bits (N) this bitset manages. More... | |
Templated fixed-size bitset for bit manipulation.
[AI]
[AI] Provides a simple implementation similar to std::bitset, optimized for small fixed sizes with basic bit flipping and testing operations. The number of bits is set at compile time via the template argument N. [AI]
N | Number of bits in the set. [AI] |
Definition at line 18 of file mxbitset.h.
|
inline |
Constructs an empty MxBitset with all bits cleared.
[AI]
[AI] Constructor initializes internal storage and ensures all bits are set to the value zero using the Tidy() function. [AI]
Definition at line 24 of file mxbitset.h.
|
inline |
Counts the number of set bits.
[AI]
[AI] Not implemented in debug builds, always returns zero. [AI]
Definition at line 95 of file mxbitset.h.
Flips (toggles) a single bit at the given position.
[AI]
[AI] If out of range, triggers an assertion failure (Xran). [AI]
p_bit | Bit index to flip [AI] |
Definition at line 81 of file mxbitset.h.
Provides a reference-like object for a specific bit.
[AI]
p_bit | Bit index to access [AI] |
Definition at line 73 of file mxbitset.h.
Returns the number of bits (N) this bitset manages.
[AI]
Definition at line 120 of file mxbitset.h.
Tests if the given bit is set (1) or not (0).
[AI]
[AI] If out of range, triggers an assertion (Xran). [AI]
p_bit | Bit index to test [AI] |
Definition at line 107 of file mxbitset.h.