PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference > Struct Template Reference

Facade which help to develop iterators over CompressedSetOfNumbers. More...

`#include <plask/utils/numbers_set.hpp>`

Inheritance diagram for plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >:
[legend]
Collaboration diagram for plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >:
[legend]

## 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

## Detailed Description

template<typename number_t = std::size_t>
template<typename Derived, class Value = number_t, class Reference = Value>
struct plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >

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.

## Member Typedef Documentation

## ◆ ConstSegmentIterator

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

typedef std::vector<Segment>::const_iterator plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::ConstSegmentIterator

Definition at line 103 of file numbers_set.hpp.

## Constructor & Destructor Documentation

## ◆ ConstIteratorFacade() [1/3]

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::ConstIteratorFacade | ( |  | ) |
| 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.

## ◆ ConstIteratorFacade() [2/3]

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::ConstIteratorFacade | ( | std::size_t | index,
|  | ConstSegmentIterator | segmentIterator
| ) |  |
| inline

Definition at line 114 of file numbers_set.hpp.

## ◆ ConstIteratorFacade() [3/3]

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::ConstIteratorFacade | ( | std::size_t | index | ) |
| inline

Definition at line 116 of file numbers_set.hpp.

## Member Function Documentation

## ◆ getIndex()

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

std::size_t plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::getIndex | ( |  | ) | const
| inline

Get current iterator position (index).

Returns
  current iterator position (index)

Definition at line 122 of file numbers_set.hpp.

## ◆ getNumber()

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

number_t plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::getNumber | ( |  | ) | const
| inline

Definition at line 129 of file numbers_set.hpp.

## ◆ setIndex()

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

void plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::setIndex | ( | std::size_t | index | ) |
| inline

Definition at line 124 of file numbers_set.hpp.

## Friends And Related Symbol Documentation

## ◆ boost::iterator_core_access

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

friend class boost::iterator_core_access
| friend

Definition at line 135 of file numbers_set.hpp.

## Member Data Documentation

## ◆ index

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

std::size_t plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< Derived, Value, Reference >::index

Current index.

Definition at line 109 of file numbers_set.hpp.

## ◆ segmentIterator

template<typename number_t = std::size_t>
template<typename Derived , class Value = number_t, class Reference = Value>

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.

The documentation for this struct was generated from the following file:

- plask/utils/numbers_set.hpp