BitMagic-C++: bm::bvector< Alloc >::iterator_base Class Reference

BitMagic-C++

Data Structures | Public Member Functions | Protected Attributes | Friends
bm::bvector< Alloc >::iterator_base Class Reference
BitMagic Library » bvector<> container » bvector<> iterators

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
| Bit-block descriptor. More...
union | block_descr
struct | dgap_descr
| Information about current DGAP block. More...

## Public Member Functions
| iterator_base () BMNOEXCEPT
bool | operator== (const iterator_base &it) const BMNOEXCEPT
bool | operator!= (const iterator_base &it) const BMNOEXCEPT
bool | operator< (const iterator_base &it) const BMNOEXCEPT
bool | operator<= (const iterator_base &it) const BMNOEXCEPT
bool | operator> (const iterator_base &it) const BMNOEXCEPT
bool | operator>= (const iterator_base &it) const BMNOEXCEPT
bool | valid () const BMNOEXCEPT
| Checks if iterator is still valid. Analog of != 0 comparison for pointers. More...
void | invalidate () BMNOEXCEPT
| Turns iterator into an invalid state. More...
bool | compare_state (const iterator_base &ib) const BMNOEXCEPT
| Compare FSMs for testing purposes. More...

## Protected Attributes
bm::bvector< Alloc > * | bv_
| Pointer on parent bitvector. More...
size_type | position_
| Bit position (bit idx) More...
const bm::word_t * | block_
| Block pointer.(NULL-invalid) More...
unsigned | block_type_
| Type of block. 0-Bit, 1-GAP. More...
block_idx_type | block_idx_
| Block index. More...
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 236 of file bm.h.

## Constructor & Destructor Documentation

## ◆ iterator_base()

template<class Alloc >

bm::bvector< Alloc >::iterator_base::iterator_base | ( |  | ) |
| inline

Definition at line 240 of file bm.h.

## Member Function Documentation

## ◆ compare_state()

template<class Alloc >

bool bm::bvector< Alloc >::iterator_base::compare_state | ( | const iterator_base & | ib | ) | const
| inline

Compare FSMs for testing purposes.

Definition at line 292 of file bm.h.

References bm::bvector< Alloc >::iterator_base::bdescr_, bm::bvector< Alloc >::iterator_base::block_descr::bit_, bm::bvector< Alloc >::iterator_base::bitblock_descr::bits, bm::bvector< Alloc >::iterator_base::block_, bm::bvector< Alloc >::iterator_base::block_idx_, bm::bvector< Alloc >::iterator_base::block_type_, bm::bvector< Alloc >::iterator_base::bv_, bm::bvector< Alloc >::iterator_base::bitblock_descr::cnt, bm::bvector< Alloc >::iterator_base::block_descr::gap_, bm::bvector< Alloc >::iterator_base::dgap_descr::gap_len, bm::bvector< Alloc >::iterator_base::bitblock_descr::idx, bm::bvector< Alloc >::iterator_base::bitblock_descr::pos, bm::bvector< Alloc >::iterator_base::position_, bm::bvector< Alloc >::iterator_base::bitblock_descr::ptr, and bm::bvector< Alloc >::iterator_base::dgap_descr::ptr.

## ◆ invalidate()

template<class Alloc >

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

Turns iterator into an invalid state.

Definition at line 286 of file bm.h.

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

## ◆ operator!=()

template<class Alloc >

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

Definition at line 250 of file bm.h.

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

## ◆ operator<()

template<class Alloc >

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

Definition at line 255 of file bm.h.

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

## ◆ operator<=()

template<class Alloc >

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

Definition at line 260 of file bm.h.

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

## ◆ operator==()

template<class Alloc >

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

Definition at line 245 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!=().

## ◆ operator>()

template<class Alloc >

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

Definition at line 265 of file bm.h.

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

## ◆ operator>=()

template<class Alloc >

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

Definition at line 270 of file bm.h.

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

## ◆ valid()

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.

Examples
  bvsample01_64.cpp, bvsetalgebra.cpp, sample11.cpp, sample5.cpp, svsample04.cpp, svsample05.cpp, svsample06.cpp, xsample01.cpp, xsample03.cpp, and xsample04.cpp.

Definition at line 280 of file bm.h.

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

Referenced by bv2delta(), bv_counted_enumerator(), convert_bv2sv(), convert_bv2vect(), bm::bvector< Alloc >::counted_enumerator::counted_enumerator(), bm::rsc_sparse_vector< Val, SV >::decode(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::decode(), bm::rsc_sparse_vector< Val, SV >::decode_buf(), generate_random_subset(), main(), bm::bvector< Alloc >::counted_enumerator::operator++(), bm::bvector< Alloc >::counted_enumerator::operator=(), print_bvector(), bm::set2set_11_transform< SV >::remap(), bm::bvector< Alloc >::enumerator::skip_to_rank(), speed_test_bv_index(), speed_test_bvs_index(), speed_test_sv_index(), speed_test_vect_index(), and DNA_FingerprintScanner::TranslateResults().

## Friends And Related Function Documentation

## ◆ bvector

template<class Alloc >

friend class bvector
| friend

Definition at line 238 of file bm.h.

## Field Documentation

## ◆ bdescr_

template<class Alloc >

union bm::bvector::iterator_base::block_descr bm::bvector< Alloc >::iterator_base::bdescr_
| protected

Referenced by bm::bvector< Alloc >::iterator_base::compare_state().

## ◆ block_

template<class Alloc >

const bm::word_t* bm::bvector< Alloc >::iterator_base::block_
| protected

Block pointer.(NULL-invalid)

Definition at line 348 of file bm.h.

Referenced by bm::bvector< Alloc >::iterator_base::compare_state().

## ◆ block_idx_

template<class Alloc >

block_idx_type bm::bvector< Alloc >::iterator_base::block_idx_
| protected

Block index.

Definition at line 350 of file bm.h.

Referenced by bm::bvector< Alloc >::iterator_base::compare_state().

## ◆ block_type_

template<class Alloc >

unsigned bm::bvector< Alloc >::iterator_base::block_type_
| protected

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

Definition at line 349 of file bm.h.

Referenced by bm::bvector< Alloc >::iterator_base::compare_state(), and bm::bvector< Alloc >::iterator_base::invalidate().

## ◆ bv_

template<class Alloc >

bm::bvector<Alloc>* bm::bvector< Alloc >::iterator_base::bv_
| protected

Pointer on parent bitvector.

Definition at line 346 of file bm.h.

Referenced by bm::bvector< Alloc >::mem_pool_guard::assign_if_not_set(), bm::bvector< Alloc >::iterator_base::compare_state(), bm::bvector< Alloc >::enumerator::enumerator(), bm::bvector< Alloc >::iterator_base::operator==(), and bm::bvector< Alloc >::mem_pool_guard::~mem_pool_guard().

## ◆ position_

template<class Alloc >

size_type bm::bvector< Alloc >::iterator_base::position_
| protected

Bit position (bit idx)

Definition at line 347 of file bm.h.

Referenced by bm::bvector< Alloc >::iterator_base::compare_state(), 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