#include <libecc/bitset.h>
Inheritance diagram for libecc::bitset_index:
Public Member Functions | |
int | get_index (void) const |
Protected Member Functions | |
void | left (void) |
Move one bit left in the bitset. | |
void | right (void) |
Move one bit right in the bitset. | |
void | left (int n) |
Move n bits left in the bitset. | |
void | right (int n) |
Move n bits right in the bitset. | |
bitset_index (void) | |
Construct an uninitialized bitset index. | |
bitset_index (bitset_index const &index) | |
Copy constructor. | |
bitset_index (int bit) | |
Construct a bitset index that points to bit number bit. | |
Protected Attributes | |
int | M_index |
The bit number that this index points to. | |
Friends | |
bool | operator== (bitset_index const &i1, bitset_index const &i2) |
Equality operator. | |
bool | operator!= (bitset_index const &i1, bitset_index const &i2) |
Inequality operator. |
This class represents a bit index, the distance between the bit refered to and the least significant bit. It does not specify which bitset instance or even the size of the bitset. The index can contain positive and negative values, an offset of -1 represents the singular 'rend()' const_reverse_iterator. Using an index that is too large or too small for the bitset that it is being used with will leads to undefined behaviour.
|
Construct an uninitialized bitset index.
|
|
Copy constructor.
|
|
Construct a bitset index that points to bit number bit. bit may be -1 (one before the start) which is equivalent with rend() or --begin() . |
|
Accessor for the current bit index. |
|
Move n bits left in the bitset.
|
|
Move one bit left in the bitset.
|
|
Move n bits right in the bitset.
|
|
Move one bit right in the bitset.
|
|
Inequality operator.
|
|
Equality operator.
|
|
The bit number that this index points to.
|