BitMagic-C++
Public Types | Public Member Functions | Protected Attributes | Friends
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:
Collaboration graph
[legend]

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
  More...
 
 insert_iterator (const insert_iterator &iit)
 
insert_iteratoroperator= (const insert_iterator &ii)
  More...
 
insert_iteratoroperator= (size_type n)
  More...
 
insert_iteratoroperator* ()
  More...
 
insert_iteratoroperator++ ()
  More...
 
insert_iteratoroperator++ (int)
  More...
 
bvector_typeget_bvector () const
  More...
 

Protected Attributes

bvector_typebvect_
  More...
 
size_type max_bit_
  More...
 

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
Examples
sample18.cpp, and xsample04a.cpp.

Definition at line 380 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 438 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 432 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 434 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 436 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= ( size_type  n)
inline

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