#include <SparseBitmap.h>
However, to keep in-line with the sparse nature of the class, incrementing the iterator advances only through over the set bits in the bitmap, and the dereference operator returns the offset of the set bit.
For example, if bits 1, 5, and 10 are set, then dereferencing the return from begin() returns 1, incrementing and dereferencing returns 5, etc.
Definition at line 150 of file SparseBitmap.h.
Public Member Functions | |
iterator () | |
Constructor to initialize an empty iterator. | |
_inttype_t | operator * () |
Dereference operator returns the current bit offset. | |
iterator & | operator++ () |
Prefix increment operator. | |
iterator | operator++ (int) |
Postfix increment operator. | |
iterator | operator+ (unsigned int diff) |
Addition operator. | |
iterator & | operator+= (unsigned int diff) |
Addition and assigment operator. | |
iterator & | operator-- () |
Prefix decrement operator. | |
iterator | operator-- (int) |
Postfix decrement operator. | |
iterator | operator- (unsigned int diff) |
Subtraction operator. | |
iterator & | operator-= (unsigned int diff) |
Subtraction and assigment operator. | |
bool | operator== (const iterator &other) |
Equality operator. | |
bool | operator!= (const iterator &other) |
Inequality operator. | |
iterator & | skip_contiguous () |
Advance past any contiguous bits, returning an iterator at the last contiguous bit that's set. | |
Private Member Functions | |
iterator (typename RangeVector::iterator iter, _inttype_t offset) | |
Private constructor used by begin() and end(). | |
Private Attributes | |
RangeVector::iterator | iter_ |
iterator to the current Range | |
_inttype_t | offset_ |
offset from start_ in the range | |
Friends | |
class | SparseBitmap< _inttype_t > |
oasys::SparseBitmap< _inttype_t >::iterator::iterator | ( | ) |
oasys::SparseBitmap< _inttype_t >::iterator::iterator | ( | typename RangeVector::iterator | iter, | |
_inttype_t | offset | |||
) | [private] |
_inttype_t oasys::SparseBitmap< _inttype_t >::iterator::operator * | ( | ) |
SparseBitmap< _inttype_t >::iterator & oasys::SparseBitmap< _inttype_t >::iterator::operator++ | ( | ) |
SparseBitmap< _inttype_t >::iterator oasys::SparseBitmap< _inttype_t >::iterator::operator++ | ( | int | ) |
SparseBitmap< _inttype_t >::iterator oasys::SparseBitmap< _inttype_t >::iterator::operator+ | ( | unsigned int | diff | ) |
SparseBitmap< _inttype_t >::iterator & oasys::SparseBitmap< _inttype_t >::iterator::operator+= | ( | unsigned int | diff | ) |
SparseBitmap< _inttype_t >::iterator & oasys::SparseBitmap< _inttype_t >::iterator::operator-- | ( | ) |
SparseBitmap< _inttype_t >::iterator oasys::SparseBitmap< _inttype_t >::iterator::operator-- | ( | int | ) |
SparseBitmap< _inttype_t >::iterator oasys::SparseBitmap< _inttype_t >::iterator::operator- | ( | unsigned int | diff | ) |
SparseBitmap< _inttype_t >::iterator & oasys::SparseBitmap< _inttype_t >::iterator::operator-= | ( | unsigned int | diff | ) |
bool oasys::SparseBitmap< _inttype_t >::iterator::operator== | ( | const iterator & | other | ) |
bool oasys::SparseBitmap< _inttype_t >::iterator::operator!= | ( | const iterator & | other | ) |
SparseBitmap< _inttype_t >::iterator & oasys::SparseBitmap< _inttype_t >::iterator::skip_contiguous | ( | ) |
Advance past any contiguous bits, returning an iterator at the last contiguous bit that's set.
The iterator must not be pointing at end() for this to be called.
Definition at line 680 of file SparseBitmap.h.
Referenced by dtn::StreamConvergenceLayer::Connection::handle_ack_segment().
friend class SparseBitmap< _inttype_t > [friend] |
Definition at line 220 of file SparseBitmap.h.
RangeVector::iterator oasys::SparseBitmap< _inttype_t >::iterator::iter_ [private] |
_inttype_t oasys::SparseBitmap< _inttype_t >::iterator::offset_ [private] |