![]() |
Gaia-ECS v0.9.3
A simple and powerful entity component system
|
Public Types | |
| using | size_type = typename size_type_selector< BitsPerItem==32 >::type |
| using | iter = const_iterator< bitset > |
| using | iter_inv = const_iterator_inverse< bitset > |
| using | iter_rev = const_reverse_iterator< bitset > |
| using | iter_rev_inv = const_reverse_inverse_iterator< bitset > |
Public Member Functions | |
| constexpr size_type * | data () |
| constexpr const size_type * | data () const |
| GAIA_NODISCARD constexpr uint32_t | items () const |
| Returns the number of words used by the bitset internally. | |
| constexpr iter | begin () const |
| constexpr iter | end () const |
| constexpr iter_rev | rbegin () const |
| constexpr iter_rev | rend () const |
| constexpr iter_inv | ibegin () const |
| constexpr iter_inv | iend () const |
| constexpr iter_rev_inv | ribegin () const |
| constexpr iter_rev_inv | riend () const |
| GAIA_NODISCARD constexpr bool | operator[] (uint32_t pos) const |
| GAIA_NODISCARD constexpr bool | operator== (const bitset &other) const |
| GAIA_NODISCARD constexpr bool | operator!= (const bitset &other) const |
| constexpr void | set () |
| Sets all bits. | |
| constexpr void | set (uint32_t pos, bool value=true) |
| Sets the bit at the given position. | |
| constexpr bitset & | flip () |
| Flips all bits. | |
| constexpr void | flip (uint32_t pos) |
| Flips the bit at the postion. | |
| constexpr bitset & | flip (uint32_t bitFrom, uint32_t bitTo) |
| Flips all bits from. | |
| constexpr void | reset () |
| Unsets all bits. | |
| constexpr void | reset (uint32_t pos) |
| Unsets the bit at the postion. | |
| GAIA_NODISCARD constexpr bool | test (uint32_t pos) const |
| Returns the value of the bit at the position. | |
| GAIA_NODISCARD constexpr bool | all () const |
| Checks if all bits are set. | |
| GAIA_NODISCARD constexpr bool | any () const |
| Checks if any bit is set. | |
| GAIA_NODISCARD constexpr bool | none () const |
| Checks if all bits are reset. | |
| GAIA_NODISCARD uint32_t | count () const |
| Returns the number of set bits. | |
| GAIA_NODISCARD constexpr uint32_t | size () const |
| Returns the number of bits the bitset can hold. | |
Public Attributes | |
| friend | iter |
| friend | iter_inv |
| friend | iter_rev |
| friend | iter_rev_inv |
Static Public Attributes | |
| static constexpr uint32_t | BitCount = NBits |
| static constexpr uint32_t | BitsPerItem = (NBits / 64) > 0 ? 64 : 32 |
| static constexpr uint32_t | Items = (NBits + BitsPerItem - 1) / BitsPerItem |
|
inlineconstexpr |
Flips all bits from.
| bitFrom | to |
| bitTo | (including) |
|
inlineconstexpr |
Flips the bit at the postion.
| pos |
|
inlineconstexpr |
Unsets the bit at the postion.
| pos |
|
inlineconstexpr |
Sets the bit at the given position.
| pos | Bit position to set (0-based, must be < NBits) |
| value | Value to set the bit to. Defaults to true. |
|
inlineconstexpr |
Returns the value of the bit at the position.
| pos |