44 static_assert(std::is_unsigned<word_type>::value,
"word_type must be unsigned");
85 for(; it !=
endit; ++it) {
92 if((
mBuffer.back() & mask) != mask) {
106 for(; it !=
endit; ++it) {
Represents a secure buffer i.e.
Definition Buffer.hpp:28
Iterator end() noexcept
Gets a iterator that points to the end of the buffer.
Definition Buffer.hpp:148
Iterator begin() noexcept
Gets a iterator that points to the begining of the buffer.
Definition Buffer.hpp:144
Byte * data() noexcept
Gets a pointer to the raws buffer data.
Definition Buffer.hpp:107
void reserve(size_t newCapacity) noexcept
Reservers at least newCapacity bytes in the buffer.
size_t size() const noexcept
Gets the number of bytes currently allocated in the buffer.
Definition Buffer.hpp:123
void resize(size_t newSize) noexcept
Resizes the buffer to be able to store up-to "newSize" bytes.
size_t mSize
The buffer size.
Definition Buffer.hpp:41
bool empty() const noexcept
Checks if the buffer is currently empty (i.e.
Definition Buffer.hpp:131
The DynamicBitSet, which similar to BitSet, but does not have the size in its type.
Definition DynamicBitSet.hpp:40
static constexpr word_type word_mask(const size_type index) noexcept
Mask representing a mask for a given bit within its word.
Definition DynamicBitSet.hpp:323
static constexpr buffer_size_type word_index(const size_type i) noexcept
Index of a word in buffer for a given bit index.
Definition DynamicBitSet.hpp:317
void reset(const size_type i)
Definition DynamicBitSet.hpp:127
void set(const size_type i, const bool b)
Definition DynamicBitSet.hpp:129
buffer_size_type word_size() const noexcept
Definition DynamicBitSet.hpp:68
word_type * data() noexcept
Definition DynamicBitSet.hpp:69
iterator end()
Definition DynamicBitSet.hpp:272
DynamicBitSet(DynamicBitSet &&x) noexcept
Definition DynamicBitSet.hpp:58
void assign(const buffer_type &buf)
Definition DynamicBitSet.hpp:155
bool all() const noexcept
All bits true?
Definition DynamicBitSet.hpp:79
bool any() const noexcept
Any bits true?
Definition DynamicBitSet.hpp:100
typename buffer_type::value_type word_type
Definition DynamicBitSet.hpp:43
buffer_type mBuffer
Definition DynamicBitSet.hpp:326
bool none() const noexcept
No bits true?
Definition DynamicBitSet.hpp:121
bool operator[](const size_type i) const
Definition DynamicBitSet.hpp:212
typename buffer_type::allocator_type allocator_type
Definition DynamicBitSet.hpp:45
DynamicBitSet & operator=(const DynamicBitSet &x)=default
bool empty() const noexcept
Definition DynamicBitSet.hpp:71
const_iterator begin() const
Definition DynamicBitSet.hpp:274
size_t byte_size() const noexcept
Definition DynamicBitSet.hpp:72
void flip(const size_type i)
Definition DynamicBitSet.hpp:137
size_type mSize
Definition DynamicBitSet.hpp:327
bitref operator[](const size_type i)
Definition DynamicBitSet.hpp:213
void set(const size_type i)
Definition DynamicBitSet.hpp:125
iterator begin()
Definition DynamicBitSet.hpp:271
const buffer_type & buffer() const
Definition DynamicBitSet.hpp:73
void append(const DynamicBitSet &other)
Definition DynamicBitSet.hpp:160
bool test(const size_type i) const noexcept
Test single bit.
Definition DynamicBitSet.hpp:76
DynamicBitSet(const size_type size, word_type value=0, const allocator_type &alloc=allocator_type())
Definition DynamicBitSet.hpp:51
void resize(const size_type size)
Definition DynamicBitSet.hpp:141
DynamicBitSet(const allocator_type &alloc=allocator_type()) noexcept
Definition DynamicBitSet.hpp:50
static constexpr uint8_t bit_index(const size_type i) noexcept
Index of a bit within its word.
Definition DynamicBitSet.hpp:320
const_iterator end() const
Definition DynamicBitSet.hpp:275
DynamicBitSet(const DynamicBitSet &x)=default
void reserve(const size_type size)
Definition DynamicBitSet.hpp:140
void copy(iterator from, iterator to, const_iterator source)
Definition DynamicBitSet.hpp:277
void push_back(const bool b)
Definition DynamicBitSet.hpp:150
DynamicBitSet & operator=(DynamicBitSet &&x) noexcept
Definition DynamicBitSet.hpp:59
static constexpr uint8_t bits_per_word
Definition DynamicBitSet.hpp:48
static constexpr buffer_size_type word_size(const size_type size) noexcept
Required word size for a given bit size.
Definition DynamicBitSet.hpp:314
size_t size_type
Definition DynamicBitSet.hpp:46
const word_type * data() const noexcept
Definition DynamicBitSet.hpp:70
size_type size() const noexcept
Definition DynamicBitSet.hpp:67
typename buffer_type::size_type buffer_size_type
Definition DynamicBitSet.hpp:47
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition DynamicBitSet.hpp:188
word_type & word
Definition DynamicBitSet.hpp:208
bool test() const
Definition DynamicBitSet.hpp:190
void reset()
Definition DynamicBitSet.hpp:192
const word_type mask
Definition DynamicBitSet.hpp:209
void set(const bool b)
Definition DynamicBitSet.hpp:194
void flip()
Definition DynamicBitSet.hpp:193
bitref operator=(const bool b)
Definition DynamicBitSet.hpp:202
bitref(word_type &w, word_type m)
Definition DynamicBitSet.hpp:189
void set()
Definition DynamicBitSet.hpp:191
Definition DynamicBitSet.hpp:243
const_iterator operator--(int)
Definition DynamicBitSet.hpp:259
const DynamicBitSet & bitset
Definition DynamicBitSet.hpp:268
const_iterator(const DynamicBitSet &b, const size_t i)
Definition DynamicBitSet.hpp:244
friend const_iterator operator-(const_iterator a, ptrdiff_t b)
Definition DynamicBitSet.hpp:265
const_iterator & operator--()
Definition DynamicBitSet.hpp:255
bool operator*() const
Definition DynamicBitSet.hpp:266
const_iterator(iterator i)
Definition DynamicBitSet.hpp:245
friend const_iterator operator+(const_iterator a, ptrdiff_t b)
Definition DynamicBitSet.hpp:264
const_iterator & operator++()
Definition DynamicBitSet.hpp:246
const_iterator operator++(int)
Definition DynamicBitSet.hpp:250
Definition DynamicBitSet.hpp:215
iterator operator++(int)
Definition DynamicBitSet.hpp:221
iterator(DynamicBitSet &b, const size_t i)
Definition DynamicBitSet.hpp:216
iterator operator--(int)
Definition DynamicBitSet.hpp:230
iterator & operator++()
Definition DynamicBitSet.hpp:217
DynamicBitSet & bitset
Definition DynamicBitSet.hpp:240
friend iterator operator+(iterator a, ptrdiff_t b)
Definition DynamicBitSet.hpp:235
bool operator*() const
Definition DynamicBitSet.hpp:237
bitref operator*()
Definition DynamicBitSet.hpp:238
friend iterator operator-(iterator a, ptrdiff_t b)
Definition DynamicBitSet.hpp:236
iterator & operator--()
Definition DynamicBitSet.hpp:226
Definition DynamicBitSet.hpp:21
void inc()
Definition DynamicBitSet.hpp:23
void dec()
Definition DynamicBitSet.hpp:24
bool operator==(const DynamicBitSetIteratorBase &other) const
Definition DynamicBitSet.hpp:25
size_t index
Definition DynamicBitSet.hpp:29
bool operator!=(const DynamicBitSetIteratorBase &other) const
Definition DynamicBitSet.hpp:26
DynamicBitSetIteratorBase(const size_t i) noexcept
Definition DynamicBitSet.hpp:22
friend ptrdiff_t operator-(const DynamicBitSetIteratorBase &a, const DynamicBitSetIteratorBase &b)
Definition DynamicBitSet.hpp:28