A set of boolean flags.
More...
#include <bitset.h>
A set of boolean flags.
Definition at line 30 of file bitset.h.
◆ bits_t
◆ Bitset() [1/2]
Beatmup::Bitset::Bitset |
( |
| ) |
|
|
inline |
◆ Bitset() [2/2]
Beatmup::Bitset::Bitset |
( |
size_t |
size, |
|
|
bool |
value |
|
) |
| |
|
inline |
Definition at line 52 of file bitset.h.
static const bits_t ALL_ONES
static const size_t PACK_SIZE
std::vector< bits_t > bits
#define ceili(x, y)
integer division x/y with ceiling
◆ getBit()
bool Beatmup::Bitset::getBit |
( |
size_t |
i | ) |
const |
|
inlineprivate |
◆ resize()
void Beatmup::Bitset::resize |
( |
size_t |
size | ) |
|
|
inline |
◆ setAll()
void Beatmup::Bitset::setAll |
( |
bool |
value | ) |
|
|
inline |
Definition at line 60 of file bitset.h.
64 for (
auto &_ :
bits) _ = 0;
◆ set()
void Beatmup::Bitset::set |
( |
size_t |
i, |
|
|
bool |
value = true |
|
) |
| |
|
inline |
Definition at line 67 of file bitset.h.
#define BEATMUP_ASSERT_DEBUG(C)
◆ all()
bool Beatmup::Bitset::all |
( |
| ) |
const |
|
inline |
Definition at line 75 of file bitset.h.
81 return (~(
bits.back() & ((
_1_ << rem) - 1))) == 0;
◆ any()
bool Beatmup::Bitset::any |
( |
| ) |
const |
|
inline |
Definition at line 85 of file bitset.h.
91 return (
bits.back() & ((
_1_ << rem) - 1)) > 0;
◆ count()
size_t Beatmup::Bitset::count |
( |
| ) |
const |
|
inline |
Definition at line 95 of file bitset.h.
97 for (
size_t i = 0; i <
size; ++i)
bool getBit(size_t i) const
◆ operator[]()
bool Beatmup::Bitset::operator[] |
( |
size_t |
i | ) |
const |
|
inline |
◆ ALL_ONES
const bits_t Beatmup::Bitset::ALL_ONES = 0xffffffff |
|
staticprivate |
◆ _1_
◆ PACK_SIZE
const size_t Beatmup::Bitset::PACK_SIZE = 8 * sizeof(bits_t) |
|
staticprivate |
◆ bits
std::vector<bits_t> Beatmup::Bitset::bits |
|
private |
◆ size
size_t Beatmup::Bitset::size |
|
private |
The documentation for this class was generated from the following file: