Constant input iterator designed to enumerate "ON" bits. More...
#include <bm.h>
Public Types | |
typedef std::input_iterator_tag | iterator_category |
typedef unsigned | value_type |
typedef unsigned | difference_type |
typedef unsigned * | pointer |
typedef unsigned & | reference |
Public Member Functions | |
enumerator () | |
enumerator (const bvector< Alloc > *bvect, int position) | |
bm::id_t | operator* () const |
bm::id_t | value () const |
enumerator & | operator++ () |
enumerator | operator++ (int) |
void | go_first () |
enumerator & | go_up () |
Constant input iterator designed to enumerate "ON" bits.
sample5.cpp, and sample8.cpp.
Definition at line 385 of file bm.h.
typedef unsigned bm::bvector< Alloc >::enumerator::difference_type |
typedef std::input_iterator_tag bm::bvector< Alloc >::enumerator::iterator_category |
Reimplemented in bm::bvector< Alloc >::counted_enumerator.
typedef unsigned* bm::bvector< Alloc >::enumerator::pointer |
typedef unsigned& bm::bvector< Alloc >::enumerator::reference |
typedef unsigned bm::bvector< Alloc >::enumerator::value_type |
bm::bvector< Alloc >::enumerator::enumerator | ( | ) | [inline] |
bm::bvector< Alloc >::enumerator::enumerator | ( | const bvector< Alloc > * | bvect, | |
int | position | |||
) | [inline] |
Definition at line 398 of file bm.h.
References bm::bvector< Alloc >::iterator_base::bv_, bm::bvector< Alloc >::enumerator::go_first(), and bm::bvector< Alloc >::iterator_base::invalidate().
void bm::bvector< Alloc >::enumerator::go_first | ( | ) | [inline] |
Definition at line 435 of file bm.h.
References bm::bits_in_array, bm::bits_in_block, bm::bvector< Alloc >::iterator_base::block_, bm::bvector< Alloc >::iterator_base::block_idx_, bm::bvector< Alloc >::iterator_base::block_type_, BM_ASSERT, BM_IS_GAP, bm::bvector< Alloc >::iterator_base::bv_, bm::bvector< Alloc >::iterator_base::invalidate(), bm::bvector< Alloc >::iterator_base::position_, and bm::set_array_size.
Referenced by bm::bvector< Alloc >::enumerator::enumerator().
enumerator& bm::bvector< Alloc >::enumerator::go_up | ( | ) | [inline] |
Definition at line 500 of file bm.h.
References bm::bvector< Alloc >::iterator_base::bdescr_, bm::bit_list_4(), bm::bits_in_array, bm::bits_in_block, bm::bvector< Alloc >::iterator_base::block_, bm::bvector< Alloc >::iterator_base::block_idx_, bm::bvector< Alloc >::iterator_base::block_type_, BM_ASSERT, BM_IS_GAP, bm::bvector< Alloc >::iterator_base::bv_, bm::gap_max_bits, bm::bvector< Alloc >::iterator_base::invalidate(), bm::bvector< Alloc >::iterator_base::position_, bm::set_array_mask, bm::set_array_shift, bm::set_array_size, and bm::set_block_size.
Referenced by bm::bvector< Alloc >::counted_enumerator::operator++(), and bm::bvector< Alloc >::enumerator::operator++().
bm::id_t bm::bvector< Alloc >::enumerator::operator* | ( | ) | const [inline] |
Definition at line 412 of file bm.h.
References bm::bvector< Alloc >::iterator_base::position_.
enumerator bm::bvector< Alloc >::enumerator::operator++ | ( | int | ) | [inline] |
Reimplemented in bm::bvector< Alloc >::counted_enumerator.
Definition at line 427 of file bm.h.
References bm::bvector< Alloc >::enumerator::go_up().
enumerator& bm::bvector< Alloc >::enumerator::operator++ | ( | ) | [inline] |
Reimplemented in bm::bvector< Alloc >::counted_enumerator.
Definition at line 422 of file bm.h.
References bm::bvector< Alloc >::enumerator::go_up().
bm::id_t bm::bvector< Alloc >::enumerator::value | ( | ) | const [inline] |
Definition at line 417 of file bm.h.
References bm::bvector< Alloc >::iterator_base::position_.