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

Constant input iterator designed to enumerate "ON" bits counted_enumerator keeps bitcount, ie number of ON bits starting from the position 0 in the bit string up to the currently enumerated bit. More...

#include <bm.h>

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

Public Types

typedef std::input_iterator_tag iterator_category

Public Member Functions

 counted_enumerator ()
 counted_enumerator (const enumerator &en)
counted_enumeratoroperator= (const enumerator &en)
counted_enumeratoroperator++ ()
counted_enumerator operator++ (int)
bm::id_t count () const
 Number of bits ON starting from the .

Detailed Description

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

Constant input iterator designed to enumerate "ON" bits counted_enumerator keeps bitcount, ie number of ON bits starting from the position 0 in the bit string up to the currently enumerated bit.

When increment operator called current position is increased by 1.

Definition at line 731 of file bm.h.


Member Typedef Documentation

template<class Alloc>
typedef std::input_iterator_tag bm::bvector< Alloc >::counted_enumerator::iterator_category

Reimplemented from bm::bvector< Alloc >::enumerator.

Definition at line 735 of file bm.h.


Constructor & Destructor Documentation

template<class Alloc>
bm::bvector< Alloc >::counted_enumerator::counted_enumerator (  )  [inline]

Definition at line 737 of file bm.h.

template<class Alloc>
bm::bvector< Alloc >::counted_enumerator::counted_enumerator ( const enumerator en  )  [inline]

Definition at line 739 of file bm.h.

References bm::bvector< Alloc >::iterator_base::valid().


Member Function Documentation

template<class Alloc>
bm::id_t bm::bvector< Alloc >::counted_enumerator::count (  )  const [inline]

Number of bits ON starting from the .

Method returns number of ON bits fromn the bit 0 to the current bit For the first bit in bitvector it is 1, for the second 2

Definition at line 777 of file bm.h.

template<class Alloc>
counted_enumerator bm::bvector< Alloc >::counted_enumerator::operator++ ( int   )  [inline]
template<class Alloc>
counted_enumerator& bm::bvector< Alloc >::counted_enumerator::operator++ (  )  [inline]
template<class Alloc>
counted_enumerator& bm::bvector< Alloc >::counted_enumerator::operator= ( const enumerator en  )  [inline]

Definition at line 746 of file bm.h.

References bm::bvector< Alloc >::iterator_base::valid().


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

Generated on Sun Apr 25 09:37:44 2010 for BitMagic by  doxygen 1.6.1