PLaSK library
|
Facade which help to develop iterators over CompressedSetOfNumbers. More...
#include <plask/utils/numbers_set.hpp>
Public Types | |
typedef std::vector< Segment >::const_iterator | ConstSegmentIterator |
Public Member Functions | |
ConstIteratorFacade () | |
Construct uninitialized iterator. Don't use it before initialization (which can be done by calling of setIndex method). | |
ConstIteratorFacade (std::size_t index, ConstSegmentIterator segmentIterator) | |
ConstIteratorFacade (std::size_t index) | |
std::size_t | getIndex () const |
Get current iterator position (index). | |
void | setIndex (std::size_t index) |
number_t | getNumber () const |
Public Attributes | |
ConstSegmentIterator | segmentIterator |
Current segment (which includes current index). It is stored in order to speed up dereference operation. | |
std::size_t | index |
Current index. | |
Friends | |
class | boost::iterator_core_access |
Facade which help to develop iterators over CompressedSetOfNumbers.
Final iterator (Derived) can iterate over numbers in set or other classes, and should (directly or indirectly) hold reference to the set.
Derived must have set() method which returns const CompressedSetOfNumbers<number_t>&
. It may also have dereference() method which returnce Reference
.
Definition at line 101 of file numbers_set.hpp.
typedef std::vector<Segment>::const_iterator plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::ConstSegmentIterator |
Definition at line 103 of file numbers_set.hpp.
|
inline |
Construct uninitialized iterator. Don't use it before initialization (which can be done by calling of setIndex method).
Definition at line 112 of file numbers_set.hpp.
|
inline |
Definition at line 114 of file numbers_set.hpp.
|
inline |
Definition at line 116 of file numbers_set.hpp.
|
inline |
Get current iterator position (index).
Definition at line 122 of file numbers_set.hpp.
|
inline |
Definition at line 129 of file numbers_set.hpp.
|
inline |
Definition at line 124 of file numbers_set.hpp.
Definition at line 135 of file numbers_set.hpp.
std::size_t plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::index |
Current index.
Definition at line 109 of file numbers_set.hpp.
ConstSegmentIterator plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::segmentIterator |
Current segment (which includes current index). It is stored in order to speed up dereference operation.
Definition at line 106 of file numbers_set.hpp.