PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT > Struct Template Reference

Polymorphic iterator that wrap another (usually not polymorphic) iterator (of type wrapped_iterator_type). More...

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

Inheritance diagram for plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >:
[legend]
Collaboration diagram for plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >:
[legend]

## Public Member Functions
| PolymorphicForwardIteratorWrapperImpl (wrapped_iterator_type wrapped_iterator)
ReferenceT | dereference () const override
void | increment () override
| Iterate to next value.
bool | equal (const PolymorphicForwardIteratorImpl< ValueT, ReferenceT > &other) const override
| Check if this is equal to `other`.
std::unique_ptr< PolymorphicForwardIteratorImpl< ValueT, ReferenceT > > | clone () const override
| Clone this iterator.
Public Member Functions inherited from plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >
virtual | ~PolymorphicForwardIteratorImpl ()
| Virtual destructor, do nothing.

## Public Attributes
wrapped_iterator_type | wrapped_iterator

## Additional Inherited Members
Public Types inherited from plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >
typedef ValueT | value_type
| Type of objects pointed by the iterator.
typedef ReferenceT | reference
| Type to represent a reference to an object pointed by the iterator.

## Detailed Description

template<typename wrapped_iterator_type, typename ValueT, typename ReferenceT = ValueT&>
struct plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >

Polymorphic iterator that wrap another (usually not polymorphic) iterator (of type wrapped_iterator_type).

Definition at line 100 of file iterators.hpp.

## Constructor & Destructor Documentation

## ◆ PolymorphicForwardIteratorWrapperImpl()

template<typename wrapped_iterator_type , typename ValueT , typename ReferenceT = ValueT&>

plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >::PolymorphicForwardIteratorWrapperImpl | ( | wrapped_iterator_type | wrapped_iterator | ) |
| inline

Definition at line 104 of file iterators.hpp.

## Member Function Documentation

## ◆ clone()

template<typename wrapped_iterator_type , typename ValueT , typename ReferenceT = ValueT&>

std::unique_ptr< PolymorphicForwardIteratorImpl< ValueT, ReferenceT > > plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >::clone | ( |  | ) | const
| inline override virtual

Clone this iterator.

Returns
  clone of `*this`, allocated with new operator (caller is responsible for deleting it)

Implements plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >.

Definition at line 114 of file iterators.hpp.

## ◆ dereference()

template<typename wrapped_iterator_type , typename ValueT , typename ReferenceT = ValueT&>

ReferenceT plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >::dereference | ( |  | ) | const
| inline override virtual

Returns
  current value

Implements plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >.

Definition at line 106 of file iterators.hpp.

## ◆ equal()

template<typename wrapped_iterator_type , typename ValueT , typename ReferenceT = ValueT&>

bool plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >::equal | ( | const PolymorphicForwardIteratorImpl< ValueT, ReferenceT > & | other | ) | const
| inline override virtual

Check if this is equal to `other`.

Returns
  true only if this is equal to other

Implements plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >.

Definition at line 110 of file iterators.hpp.

## ◆ increment()

template<typename wrapped_iterator_type , typename ValueT , typename ReferenceT = ValueT&>

void plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >::increment | ( |  | ) |
| inline override virtual

Iterate to next value.

Implements plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >.

Definition at line 108 of file iterators.hpp.

## Member Data Documentation

## ◆ wrapped_iterator

template<typename wrapped_iterator_type , typename ValueT , typename ReferenceT = ValueT&>

wrapped_iterator_type plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >::wrapped_iterator

Definition at line 102 of file iterators.hpp.

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

- plask/utils/iterators.hpp