Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals | Examples

bm::bvector< Alloc, MS >::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, MS >::counted_enumerator:

Inheritance graph
[legend]
Collaboration diagram for bm::bvector< Alloc, MS >::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 MS>
class bm::bvector< Alloc, MS >::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 720 of file bm.h.


Member Typedef Documentation

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

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

Definition at line 724 of file bm.h.


Constructor & Destructor Documentation

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

Definition at line 726 of file bm.h.

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

Definition at line 728 of file bm.h.


Member Function Documentation

template<class Alloc, class MS>
bm::id_t bm::bvector< Alloc, MS >::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 766 of file bm.h.

template<class Alloc, class MS>
counted_enumerator bm::bvector< Alloc, MS >::counted_enumerator::operator++ int   )  [inline]
 

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

Definition at line 752 of file bm.h.

References bm::bvector< Alloc, MS >::enumerator::go_up().

template<class Alloc, class MS>
counted_enumerator& bm::bvector< Alloc, MS >::counted_enumerator::operator++  )  [inline]
 

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

Definition at line 744 of file bm.h.

References bm::bvector< Alloc, MS >::enumerator::go_up().

template<class Alloc, class MS>
counted_enumerator& bm::bvector< Alloc, MS >::counted_enumerator::operator= const enumerator en  )  [inline]
 

Definition at line 735 of file bm.h.


The documentation for this class was generated from the following file:
Generated on Sun Aug 5 14:12:38 2007 for BitMagic by  doxygen 1.4.1