IndexContainersBLBitSetWordIterator

BLBitSetWordIterator Class Referencefinal [¶]

BitSet word iterator [C++ API].

Low-level iterator that sees a BitSet as an array of bit words. It only iterates non-zero words and returns zero at the end of iteration.

A simple way of printing all non-zero words of a BitWord:

set.add_range(100, 200);
while (uint32_t bits = it.next_word()) {
printf("{WordIndex: %u, WordData: %08X }\n", it.word_index(), bits);
}

Public Members

Members

Member Functions

Construction & Destruction
Overloaded Operators
Reset
Iterator Interface

BLBitSetWordIterator::BLBitSetWordIterator()noexcept[1/3][¶]

Creates a default constructed iterator, not initialized to iterate any BitSet.

BLBitSetWordIterator::BLBitSetWordIterator(
const BLBitSetCore& bit_set
)noexcept[2/3][¶]

Creates an iterator, that will iterate the given bit_set.

Note

The bit_set cannot change or be destroyed during iteration.

BLBitSetWordIterator::BLBitSetWordIterator()defaultnoexcept[3/3][¶]

Creates a copy of other iterator.

void BLBitSetWordIterator::reset()noexcept[1/2][¶]

Resets the iterator (puts it into a default constructed state).

void BLBitSetWordIterator::reset(
const BLBitSetCore& bit_set
)noexcept[2/2][¶]

Reinitializes the iterator to iterate the given bit_set, from the beginning.

uint32_t BLBitSetWordIterator::next_word()noexcept[¶]

Returns the next (or the first, if called the first time) non-zero word of the BitSet or zero if the iteration ended.

Use word_index() to get the index (in word units) of the word returned.

uint32_t BLBitSetWordIterator::bit_index() constnoexcept[¶]

Returns the current bit index of a word returned by next_word().

uint32_t BLBitSetWordIterator::word_index() constnoexcept[¶]

Returns the current word index of a word returned by next_word().