BitMagic-C++
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>

Collaboration diagram for bm::bvector< Alloc >::insert_iterator:

Public Types

typedef std::output_iterator_tag iterator_category
 
typedef bm::bvector< Alloc > bvector_type
 
typedef size_type value_type
 
typedef void difference_type
 
typedef void pointer
 
typedef void reference
 

Public Member Functions

 insert_iterator () BMNOEXCEPT
 
 insert_iterator (bvector< Alloc > &bvect) BMNOEXCEPT
 
 insert_iterator (const insert_iterator &iit)
 
insert_iteratoroperator= (const insert_iterator &ii)
 
insert_iteratoroperator= (size_type n)
 
insert_iteratoroperator* ()
 
insert_iteratoroperator++ ()
 
insert_iteratoroperator++ (int)
 
bvector_typeget_bvector () const
 

Protected Attributes

bvector_typebvect_
 
size_type max_bit_
 

Friends

class bulk_insert_iterator
 

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.
See also
bulk_insert_iterator

Definition at line 377 of file bm.h.

Member Typedef Documentation

◆ bvector_type

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

Definition at line 384 of file bm.h.

◆ difference_type

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

Definition at line 386 of file bm.h.

◆ iterator_category

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

Definition at line 382 of file bm.h.

◆ pointer

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

Definition at line 387 of file bm.h.

◆ reference

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

Definition at line 388 of file bm.h.

◆ value_type

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

Definition at line 385 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 390 of file bm.h.

◆ insert_iterator() [2/3]

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

◆ insert_iterator() [3/3]

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

Definition at line 399 of file bm.h.

Member Function Documentation

◆ get_bvector()

template<class Alloc >
bvector_type * bm::bvector< Alloc >::insert_iterator::get_bvector ( ) const
inline

Definition at line 435 of file bm.h.

References bm::bvector< Alloc >::insert_iterator::bvect_.

◆ operator*()

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

Returns *this without doing anything (no-op)

Definition at line 429 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 431 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 433 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]

Friends And Related Symbol Documentation

◆ bulk_insert_iterator

template<class Alloc >
friend class bulk_insert_iterator
friend

Definition at line 379 of file bm.h.

Field Documentation

◆ bvect_

◆ max_bit_

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

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