PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
plask::FunctorIndexedIterator< FunctorType, Reference, Value > Struct Template Reference

Template to create iterators which using functor having size argument. More...

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

Inheritance diagram for plask::FunctorIndexedIterator< FunctorType, Reference, Value >:
[legend]
Collaboration diagram for plask::FunctorIndexedIterator< FunctorType, Reference, Value >:
[legend]

## Public Member Functions
| FunctorIndexedIterator (FunctorType functor, std::size_t index)
| Construct iterator which point to given in index in given container.
std::size_t | getIndex () const
| Get current iterator position (index).

## Public Attributes
FunctorType | functor
| Functor.
std::size_t | index
| Current iterator position (index).

## Friends
class | boost::iterator_core_access
template<class , class , class >
struct | FunctorIndexedIterator

## Detailed Description

template<typename FunctorType, typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>
struct plask::FunctorIndexedIterator< FunctorType, Reference, Value >

Template to create iterators which using functor having size argument.

Template Parameters

  ContainerType | type of container (can be const or non-const)
  Reference | iterator reference type, should be the same type which return functor operator()
  Value | iterator value type, should be the same type which return container operator[] but without reference

Definition at line 326 of file iterators.hpp.

## Constructor & Destructor Documentation

## ◆ FunctorIndexedIterator()

template<typename FunctorType , typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>

plask::FunctorIndexedIterator< FunctorType, Reference, Value >::FunctorIndexedIterator | ( | FunctorType | functor,
|  | std::size_t | index
| ) |  |
| inline

Construct iterator which point to given in index in given container.

Parameters

  functor | functor
  index | index for which this iterator should refer, argument for functor

Definition at line 339 of file iterators.hpp.

## Member Function Documentation

## ◆ getIndex()

template<typename FunctorType , typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>

std::size_t plask::FunctorIndexedIterator< FunctorType, Reference, Value >::getIndex | ( |  | ) | const
| inline

Get current iterator position (index).

Returns
  current iterator position (index)

Definition at line 345 of file iterators.hpp.

## Friends And Related Symbol Documentation

## ◆ boost::iterator_core_access

template<typename FunctorType , typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>

friend class boost::iterator_core_access
| friend

Definition at line 348 of file iterators.hpp.

## ◆ FunctorIndexedIterator

template<typename FunctorType , typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>
template<class , class , class >

friend struct FunctorIndexedIterator
| friend

Definition at line 349 of file iterators.hpp.

## Member Data Documentation

## ◆ functor

template<typename FunctorType , typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>

FunctorType plask::FunctorIndexedIterator< FunctorType, Reference, Value >::functor

Functor.

Definition at line 329 of file iterators.hpp.

## ◆ index

template<typename FunctorType , typename Reference = decltype(std::declval<FunctorType>()(0)), typename Value = typename std::remove_reference<Reference>::type>

std::size_t plask::FunctorIndexedIterator< FunctorType, Reference, Value >::index

Current iterator position (index).

Definition at line 332 of file iterators.hpp.

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

- plask/utils/iterators.hpp