PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
plask::PolymorphicForwardIterator< ImplT > Struct Template Reference

Polymorphic, forward iterator. More...

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

Inheritance diagram for plask::PolymorphicForwardIterator< ImplT >:
[legend]
Collaboration diagram for plask::PolymorphicForwardIterator< ImplT >:
[legend]

## Public Member Functions
| PolymorphicForwardIterator (ImplT *impl=nullptr)
| Construct iterator which holds given implementation object.
| PolymorphicForwardIterator (const PolymorphicForwardIterator &src)
| Copy constructor.
| PolymorphicForwardIterator (PolymorphicForwardIterator &&src)=default
| Move constructor.
void | swap (PolymorphicForwardIterator &to_swap) noexcept
| Swap values of `this` and `to_swap`.
PolymorphicForwardIterator & | operator= (const PolymorphicForwardIterator &src)
PolymorphicForwardIterator & | operator= (PolymorphicForwardIterator &&src)=default

## Protected Attributes
std::unique_ptr< ImplT > | impl

## Friends
class | boost::iterator_core_access
template<class >
struct | PolymorphicForwardIterator

## Detailed Description

template<typename ImplT>
struct plask::PolymorphicForwardIterator< ImplT >

Polymorphic, forward iterator.

Hold and delegate all calls to implementation object which is a instantiation of PolymorficForwardIteratorImpl template.

Template Parameters

  ImplT | instantiation of PolymorphicForwardIteratorImpl

Definition at line 129 of file iterators.hpp.

## Constructor & Destructor Documentation

## ◆ PolymorphicForwardIterator() [1/3]

template<typename ImplT >

plask::PolymorphicForwardIterator< ImplT >::PolymorphicForwardIterator | ( | ImplT * | impl = `nullptr` | ) |
| inline

Construct iterator which holds given implementation object.

Parameters

  impl | Implementation object. It will be delete by constructor of this. If it is `nullptr` you should not call any methods of this before assign.

Definition at line 147 of file iterators.hpp.

## ◆ PolymorphicForwardIterator() [2/3]

template<typename ImplT >

plask::PolymorphicForwardIterator< ImplT >::PolymorphicForwardIterator | ( | const PolymorphicForwardIterator< ImplT > & | src | ) |
| inline

Copy constructor.

Clone implementation object.

Parameters

  src | Iterator from which implementation object should be clone.

Definition at line 153 of file iterators.hpp.

## ◆ PolymorphicForwardIterator() [3/3]

template<typename ImplT >

plask::PolymorphicForwardIterator< ImplT >::PolymorphicForwardIterator | ( | PolymorphicForwardIterator< ImplT > && | src | ) |
| default

Move constructor.

Parameters

  src | Iterator to move from.

## Member Function Documentation

## ◆ operator=() [1/2]

template<typename ImplT >

PolymorphicForwardIterator & plask::PolymorphicForwardIterator< ImplT >::operator= | ( | const PolymorphicForwardIterator< ImplT > & | src | ) |
| inline

Definition at line 167 of file iterators.hpp.

## ◆ operator=() [2/2]

template<typename ImplT >

PolymorphicForwardIterator & plask::PolymorphicForwardIterator< ImplT >::operator= | ( | PolymorphicForwardIterator< ImplT > && | src | ) |
| default

## ◆ swap()

template<typename ImplT >

void plask::PolymorphicForwardIterator< ImplT >::swap | ( | PolymorphicForwardIterator< ImplT > & | to_swap | ) |
| inline noexcept

Swap values of `this` and `to_swap`.

Parameters

  to_swap |

Definition at line 165 of file iterators.hpp.

## Friends And Related Symbol Documentation

## ◆ boost::iterator_core_access

template<typename ImplT >

friend class boost::iterator_core_access
| friend

Definition at line 176 of file iterators.hpp.

## ◆ PolymorphicForwardIterator

template<typename ImplT >
template<class >

friend struct PolymorphicForwardIterator
| friend

Definition at line 177 of file iterators.hpp.

## Member Data Documentation

## ◆ impl

template<typename ImplT >

std::unique_ptr<ImplT> plask::PolymorphicForwardIterator< ImplT >::impl
| protected

Definition at line 138 of file iterators.hpp.

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

- plask/utils/iterators.hpp