BitMagicC++Library
Public Types | Public Member Functions | Protected Attributes
bm::bvector< Alloc >::insert_iterator Class Reference

Output iterator iterator designed to set "ON" bits based on input sequence of integers (bit indeces). More...

#include <bm.h>

Public Types

typedef std::output_iterator_tag iterator_category
 
typedef unsigned value_type
 
typedef void difference_type
 
typedef void pointer
 
typedef void reference
 

Public Member Functions

 insert_iterator ()
 
 insert_iterator (bvector< Alloc > &bvect)
 
 insert_iterator (const insert_iterator &iit)
 
insert_iteratoroperator= (const insert_iterator &ii)
 
insert_iteratoroperator= (bm::id_t n)
 
insert_iteratoroperator* ()
 
insert_iteratoroperator++ ()
 
insert_iteratoroperator++ (int)
 

Protected Attributes

bm::bvector< Alloc > * bvect_
 
bm::id_t max_bit_
 

Detailed Description

template<class Alloc>
class bm::bvector< Alloc >::insert_iterator

Output iterator iterator designed to set "ON" bits based on input sequence of integers (bit indeces).

STL container can be converted to bvector using this iterator Insert iterator guarantees the vector will be dynamically resized (set_bit does not do that).

Note
If you have many bits to set it is a good idea to use output iterator instead of explicitly calling set, because iterator may implement some performance specific tricks to make sure bulk insert is fast.

Definition at line 356 of file bm.h.

Member Typedef Documentation

◆ difference_type

template<class Alloc>
typedef void bm::bvector< Alloc >::insert_iterator::difference_type

Definition at line 363 of file bm.h.

◆ iterator_category

template<class Alloc>
typedef std::output_iterator_tag bm::bvector< Alloc >::insert_iterator::iterator_category

Definition at line 360 of file bm.h.

◆ pointer

template<class Alloc>
typedef void bm::bvector< Alloc >::insert_iterator::pointer

Definition at line 364 of file bm.h.

◆ reference

template<class Alloc>
typedef void bm::bvector< Alloc >::insert_iterator::reference

Definition at line 365 of file bm.h.

◆ value_type

template<class Alloc>
typedef unsigned bm::bvector< Alloc >::insert_iterator::value_type

Definition at line 362 of file bm.h.

Constructor & Destructor Documentation

◆ insert_iterator() [1/3]

template<class Alloc>
bm::bvector< Alloc >::insert_iterator::insert_iterator ( )
inline

Definition at line 367 of file bm.h.

◆ insert_iterator() [2/3]

template<class Alloc>
bm::bvector< Alloc >::insert_iterator::insert_iterator ( bvector< Alloc > &  bvect)
inline

Definition at line 369 of file bm.h.

◆ insert_iterator() [3/3]

template<class Alloc>
bm::bvector< Alloc >::insert_iterator::insert_iterator ( const insert_iterator iit)
inline

Definition at line 376 of file bm.h.

Member Function Documentation

◆ operator*()

template<class Alloc>
insert_iterator& bm::bvector< Alloc >::insert_iterator::operator* ( )
inline

Returns *this without doing anything (no-op)

Definition at line 409 of file bm.h.

◆ operator++() [1/2]

template<class Alloc>
insert_iterator& bm::bvector< Alloc >::insert_iterator::operator++ ( )
inline

Returns *this. This iterator does not move (no-op)

Definition at line 411 of file bm.h.

◆ operator++() [2/2]

template<class Alloc>
insert_iterator& bm::bvector< Alloc >::insert_iterator::operator++ ( int  )
inline

Returns *this. This iterator does not move (no-op)

Definition at line 413 of file bm.h.

◆ operator=() [1/2]

template<class Alloc>
insert_iterator& bm::bvector< Alloc >::insert_iterator::operator= ( const insert_iterator ii)
inline

◆ operator=() [2/2]

template<class Alloc>
insert_iterator& bm::bvector< Alloc >::insert_iterator::operator= ( bm::id_t  n)
inline

Definition at line 390 of file bm.h.

References BM_ASSERT, BM_ASSERT_THROW, and bm::id_max.

Field Documentation

◆ bvect_

template<class Alloc>
bm::bvector<Alloc>* bm::bvector< Alloc >::insert_iterator::bvect_
protected

Definition at line 416 of file bm.h.

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

◆ max_bit_

template<class Alloc>
bm::id_t bm::bvector< Alloc >::insert_iterator::max_bit_
protected

Definition at line 417 of file bm.h.

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


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