# bm::bvector< Alloc >::enumerator Class Reference
[The Main bvector<> Group]

Constant input iterator designed to enumerate "ON" bits. More...

`#include <bm.h>`

Inheritance diagram for bm::bvector< Alloc >::enumerator:
[legend]
Collaboration diagram for bm::bvector< Alloc >::enumerator:
[legend]

## 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 ()

## Detailed Description

### template<class Alloc>
class bm::bvector< Alloc >::enumerator

Constant input iterator designed to enumerate "ON" bits.

Examples:

  sample5.cpp, and sample8.cpp.

Definition at line 385 of file bm.h.

## Member Typedef Documentation

template<class Alloc>

typedef unsigned bm::bvector< Alloc >::enumerator::difference_type

Definition at line 392 of file bm.h.

template<class Alloc>

typedef std::input_iterator_tag bm::bvector< Alloc >::enumerator::iterator_category

Reimplemented in bm::bvector< Alloc >::counted_enumerator.

Definition at line 389 of file bm.h.

template<class Alloc>

typedef unsigned* bm::bvector< Alloc >::enumerator::pointer

Definition at line 393 of file bm.h.

template<class Alloc>

typedef unsigned& bm::bvector< Alloc >::enumerator::reference

Definition at line 394 of file bm.h.

template<class Alloc>

typedef unsigned bm::bvector< Alloc >::enumerator::value_type

Definition at line 391 of file bm.h.

## Constructor & Destructor Documentation

template<class Alloc>

bm::bvector< Alloc >::enumerator::enumerator | ( |  | ) | `[inline]`

Definition at line 397 of file bm.h.

template<class Alloc>

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().

## Member Function Documentation

template<class Alloc>

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().

template<class Alloc>

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++().

template<class Alloc>

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_.

template<class Alloc>

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().

template<class Alloc>

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().

template<class Alloc>

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_.

The documentation for this class was generated from the following file:

- bm.h