Iterates over the set bits in a bitset. More...
#include <BitsetIterator.hpp>
Public Member Functions | |
BitsetIterator (const bitset_t &bs) | |
Constructor. | |
HexPoint | operator* () |
Returns the HexPoint at the current location. | |
void | operator++ () |
Moves to the next set point in the bistset. | |
bool | boolean_test () const |
Used by SafeBool. | |
operator bool_type () const | |
Protected Types | |
typedef void(SafeBool::* | bool_type )() const |
Protected Member Functions | |
void | this_type_does_not_support_comparisons () const |
Private Member Functions | |
void | find_next_set_bit () |
Private Attributes | |
int | m_index |
bitset_t | m_bitset |
Iterates over the set bits in a bitset.
Similar to PointIterator.
Definition at line 19 of file BitsetIterator.hpp.
typedef void(SafeBool::* SafeBool< BitsetIterator >::bool_type)() const [protected, inherited] |
Definition at line 22 of file SafeBool.hpp.
BitsetIterator::BitsetIterator | ( | const bitset_t & | bs | ) | [inline] |
bool BitsetIterator::boolean_test | ( | ) | const [inline] |
Used by SafeBool.
Definition at line 66 of file BitsetIterator.hpp.
References FIRST_INVALID, and m_index.
void BitsetIterator::find_next_set_bit | ( | ) | [inline, private] |
Definition at line 49 of file BitsetIterator.hpp.
References FIRST_INVALID, m_bitset, m_index, and benzene_bitset< _Nb >::test().
Referenced by BitsetIterator(), and operator++().
SafeBool< BitsetIterator >::operator bool_type | ( | ) | const [inline, inherited] |
Definition at line 26 of file SafeBool.hpp.
HexPoint BitsetIterator::operator* | ( | ) | [inline] |
Returns the HexPoint at the current location.
Definition at line 55 of file BitsetIterator.hpp.
References m_index.
void BitsetIterator::operator++ | ( | ) | [inline] |
Moves to the next set point in the bistset.
Definition at line 60 of file BitsetIterator.hpp.
References find_next_set_bit(), and m_index.
void SafeBool< BitsetIterator >::this_type_does_not_support_comparisons | ( | ) | const [inline, protected, inherited] |
Definition at line 23 of file SafeBool.hpp.
bitset_t BitsetIterator::m_bitset [private] |
Definition at line 39 of file BitsetIterator.hpp.
Referenced by find_next_set_bit().
int BitsetIterator::m_index [private] |
Definition at line 38 of file BitsetIterator.hpp.
Referenced by boolean_test(), find_next_set_bit(), operator*(), and operator++().