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

Base class for all iterators. More...

`#include <bm.h>`

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

## Data Structures

struct | bitblock_descr
| Information about current bitblock. More...
union | block_descr
struct | dgap_descr
| Information about current DGAP block. More...

## Public Member Functions

| iterator_base ()
bool | operator== (const iterator_base &it) const
bool | operator!= (const iterator_base &it) const
bool | operator< (const iterator_base &it) const
bool | operator<= (const iterator_base &it) const
bool | operator> (const iterator_base &it) const
bool | operator>= (const iterator_base &it) const
bool | valid () const
| Checks if iterator is still valid.
void | invalidate ()
| Turns iterator into an invalid state.

## Protected Attributes

bm::bvector< Alloc > * | bv_
| Pointer on parent bitvector.
bm::id_t | position_
| Bit position (bit idx).
const bm::word_t * | block_
| Block pointer.(NULL-invalid).
unsigned | block_type_
| Type of block. 0-Bit, 1-GAP.
unsigned | block_idx_
| Block index.
union bm::bvector::iterator_base::block_descr | bdescr_

## Friends

class | bvector

## Detailed Description

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

Base class for all iterators.

Definition at line 231 of file bm.h.

## Constructor & Destructor Documentation

template<class Alloc>

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

Definition at line 235 of file bm.h.

## Member Function Documentation

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::invalidate | ( |  | ) | `[inline]`

Turns iterator into an invalid state.

Definition at line 281 of file bm.h.

References bm::id_max, and bm::bvector< Alloc >::iterator_base::position_.

Referenced by bm::bvector< Alloc >::enumerator::enumerator(), bm::bvector< Alloc >::enumerator::go_first(), and bm::bvector< Alloc >::enumerator::go_up().

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::operator!= | ( | const iterator_base & | it | ) | const`[inline]`

Definition at line 242 of file bm.h.

References bm::bvector< Alloc >::iterator_base::operator==().

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::operator< | ( | const iterator_base & | it | ) | const`[inline]`

Definition at line 247 of file bm.h.

References bm::bvector< Alloc >::iterator_base::position_.

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::operator<= | ( | const iterator_base & | it | ) | const`[inline]`

Definition at line 252 of file bm.h.

References bm::bvector< Alloc >::iterator_base::position_.

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::operator== | ( | const iterator_base & | it | ) | const`[inline]`

Definition at line 237 of file bm.h.

References bm::bvector< Alloc >::iterator_base::bv_, and bm::bvector< Alloc >::iterator_base::position_.

Referenced by bm::bvector< Alloc >::iterator_base::operator!=().

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::operator> | ( | const iterator_base & | it | ) | const`[inline]`

Definition at line 257 of file bm.h.

References bm::bvector< Alloc >::iterator_base::position_.

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::operator>= | ( | const iterator_base & | it | ) | const`[inline]`

Definition at line 262 of file bm.h.

References bm::bvector< Alloc >::iterator_base::position_.

template<class Alloc>

bool bm::bvector< Alloc >::iterator_base::valid | ( |  | ) | const`[inline]`

Checks if iterator is still valid.

Analog of != 0 comparison for pointers.

Returns:
  true if iterator is valid.

Definition at line 272 of file bm.h.

References bm::id_max, and bm::bvector< Alloc >::iterator_base::position_.

Referenced by bm::bvector< Alloc >::counted_enumerator::counted_enumerator(), bm::bvector< Alloc >::counted_enumerator::operator++(), and bm::bvector< Alloc >::counted_enumerator::operator=().

## Friends And Related Function Documentation

template<class Alloc>

friend class bvector`[friend]`

Definition at line 233 of file bm.h.

## Field Documentation

template<class Alloc>

union bm::bvector::iterator_base::block_descr bm::bvector< Alloc >::iterator_base::bdescr_`[protected]`

Block type dependent information for current block.

Referenced by bm::bvector< Alloc >::enumerator::go_up().

template<class Alloc>

const bm::word_t* bm::bvector< Alloc >::iterator_base::block_`[protected]`

Block pointer.(NULL-invalid).

Definition at line 308 of file bm.h.

Referenced by bm::bvector< Alloc >::enumerator::go_first(), and bm::bvector< Alloc >::enumerator::go_up().

template<class Alloc>

unsigned bm::bvector< Alloc >::iterator_base::block_idx_`[protected]`

Block index.

Definition at line 310 of file bm.h.

Referenced by bm::bvector< Alloc >::enumerator::go_first(), and bm::bvector< Alloc >::enumerator::go_up().

template<class Alloc>

unsigned bm::bvector< Alloc >::iterator_base::block_type_`[protected]`

Type of block. 0-Bit, 1-GAP.

Definition at line 309 of file bm.h.

Referenced by bm::bvector< Alloc >::enumerator::go_first(), and bm::bvector< Alloc >::enumerator::go_up().

template<class Alloc>

bm::bvector<Alloc>* bm::bvector< Alloc >::iterator_base::bv_`[protected]`

Pointer on parent bitvector.

Definition at line 306 of file bm.h.

Referenced by bm::bvector< Alloc >::enumerator::enumerator(), bm::bvector< Alloc >::enumerator::go_first(), bm::bvector< Alloc >::enumerator::go_up(), and bm::bvector< Alloc >::iterator_base::operator==().

template<class Alloc>

bm::id_t bm::bvector< Alloc >::iterator_base::position_`[protected]`

Bit position (bit idx).

Definition at line 307 of file bm.h.

Referenced by bm::bvector< Alloc >::enumerator::go_first(), bm::bvector< Alloc >::enumerator::go_up(), bm::bvector< Alloc >::iterator_base::invalidate(), bm::bvector< Alloc >::enumerator::operator*(), bm::bvector< Alloc >::iterator_base::operator<(), bm::bvector< Alloc >::iterator_base::operator<=(), bm::bvector< Alloc >::iterator_base::operator==(), bm::bvector< Alloc >::iterator_base::operator>(), bm::bvector< Alloc >::iterator_base::operator>=(), bm::bvector< Alloc >::iterator_base::valid(), and bm::bvector< Alloc >::enumerator::value().

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

- bm.h