Main Page   Reference Manual   Compound List   File List  

libecc::bitset_index_iterator< DIRECTION > Class Template Reference

A bitset index with increment/decrement methods. More...

#include <libecc/bitset.h>

Inheritance diagram for libecc::bitset_index_iterator< DIRECTION >:
Collaboration diagram for libecc::bitset_index_iterator< DIRECTION >:

List of all members.

Public Member Functions

void increment (void)
 Advance to the next bit.
void decrement (void)
 Backup to the previous bit.
void increment (int n)
 Advance to the next bit.
void decrement (int n)
 Backup to the previous bit.
 bitset_index_iterator (void)
 Construct an uninitialized iterator bitmask.
 bitset_index_iterator (bitset_index_iterator const &index)
 Copy constructor.
 bitset_index_iterator (int bit)
 Construct an iterator bitmask that points to bit number bit.

Friends

bool operator< (bitset_index_iterator const &i1, bitset_index_iterator const &i2)
 Less.
bool operator> (bitset_index_iterator const &i1, bitset_index_iterator const &i2)
 Greater.
bool operator<= (bitset_index_iterator const &i1, bitset_index_iterator const &i2)
 Less or equal.
bool operator>= (bitset_index_iterator const &i1, bitset_index_iterator const &i2)
 Greater or equal.

Detailed Description

template<int DIRECTION>
class libecc::bitset_index_iterator< DIRECTION >

A bitset index with increment/decrement methods.

This class is a direction oriented bitset_index with methods to advance and backup the index in a bitset.

Parameters:
DIRECTION Either libecc::forwards_iterating (normal iterator) or libecc::backwards_iterating (reverse iterator).

Constructor & Destructor Documentation

template<int DIRECTION>
libecc::bitset_index_iterator< DIRECTION >::bitset_index_iterator ( void   )  [inline]

Construct an uninitialized iterator bitmask.

template<int DIRECTION>
libecc::bitset_index_iterator< DIRECTION >::bitset_index_iterator ( bitset_index_iterator< DIRECTION > const &  index  )  [inline]

Copy constructor.

template<int DIRECTION>
libecc::bitset_index_iterator< DIRECTION >::bitset_index_iterator ( int  bit  )  [inline]

Construct an iterator bitmask that points to bit number bit.

bit may be -1 (one before the start) which is equivalent with rend() or --begin() .


Member Function Documentation

template<int DIRECTION>
void libecc::bitset_index_iterator< DIRECTION >::decrement ( void   )  [inline]
template<int DIRECTION>
void libecc::bitset_index_iterator< DIRECTION >::decrement ( int  n  )  [inline]

Backup to the previous bit.

References libecc::bitset_index::left(), and libecc::bitset_index::right().

template<int DIRECTION>
void libecc::bitset_index_iterator< DIRECTION >::increment ( int  n  )  [inline]

Advance to the next bit.

References libecc::bitset_index::left(), and libecc::bitset_index::right().

template<int DIRECTION>
void libecc::bitset_index_iterator< DIRECTION >::increment ( void   )  [inline]

Friends And Related Function Documentation

template<int DIRECTION>
bool operator< ( bitset_index_iterator< DIRECTION > const &  i1,
bitset_index_iterator< DIRECTION > const &  i2 
) [friend]

Less.

template<int DIRECTION>
bool operator<= ( bitset_index_iterator< DIRECTION > const &  i1,
bitset_index_iterator< DIRECTION > const &  i2 
) [friend]

Less or equal.

template<int DIRECTION>
bool operator> ( bitset_index_iterator< DIRECTION > const &  i1,
bitset_index_iterator< DIRECTION > const &  i2 
) [friend]

Greater.

template<int DIRECTION>
bool operator>= ( bitset_index_iterator< DIRECTION > const &  i1,
bitset_index_iterator< DIRECTION > const &  i2 
) [friend]

Greater or equal.

Copyright © 2002-2008 Carlo Wood.  All rights reserved.