#include <libecc/bitset.h>
Inheritance diagram for libecc::bitset_iterator< n, DIRECTION >:
Public Member Functions | |
bitset_iterator (void) | |
Construct uninitialized bitset iterator. | |
bitset_iterator (bitset_iterator const &iter) | |
Copy constructor. | |
bitset_iterator & | operator= (bitset_iterator const &iter) |
Assignment operator. | |
bitset_digit_t | operator * () const |
Access bit as zero or bitmask. | |
bitset_iterator & | operator++ () |
Preincrement. | |
bitset_iterator | operator++ (int) |
Postincrement. | |
bitset_iterator & | operator-- () |
Predecrement. | |
bitset_iterator | operator-- (int) |
Postdecrement. | |
bitset_iterator & | operator+= (int n) |
Iterator addition. | |
bitset_iterator & | operator-= (int n) |
Iterator subtraction. | |
bitset_digit_t | operator[] (int n) const |
Element operator. | |
bitset_iterator (bitset_invertible< n, false > const *bitset_ptr, int bit) | |
Construct a bitset iterator that points to bit bit of bitset bitset_ptr. | |
void | find1 (void) |
Return the first position for which the bit is set. | |
Friends | |
bitset_iterator | operator+ (bitset_iterator const &i, int n) |
Iterator addition. | |
bitset_iterator | operator+ (int n, bitset_iterator const &i) |
Iterator addition. | |
bitset_iterator | operator- (bitset_iterator const &i, int n) |
Iterator subtraction. | |
bitset_iterator | operator- (int n, bitset_iterator const &i) |
Iterator subtraction. |
This class represents a 'pointer' to a bit in a given bitset instance. However, operator*
does not return bool
but returns a bitset_digit_t containing zero when the bit is zero and a mask matching the position of the bit in the respective digit when the bit is set.
|
Construct uninitialized bitset iterator.
|
|
Copy constructor.
|
|
Construct a bitset iterator that points to bit bit of bitset bitset_ptr.
|
|
Return the first position for which the bit is set.
|
|
Access bit as zero or bitmask.
Returns 0 if the current bit is not set, otherwise returns the bit mask of that bit for the current digit. For example, if this iterator points to bit 130 and that bit is set, then |
|
Postincrement.
|
|
Preincrement.
|
|
Iterator addition.
|
|
Postdecrement.
|
|
Predecrement.
|
|
Iterator subtraction.
|
|
Assignment operator.
|
|
Element operator.
|
|
Iterator addition.
|
|
Iterator addition.
|
|
Iterator subtraction.
|
|
Iterator subtraction.
|