PLaSK library
Loading...
Searching...
No Matches
plask::PolymorphicForwardIteratorWithIndex< ImplT > Struct Template Reference

Polymorphic, forward iterator which allow to get index of current position. More...

#include <plask/utils/iterators.hpp>

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

Public Member Functions

 PolymorphicForwardIteratorWithIndex (ImplT *impl=nullptr)
 Construct iterator which holds given implementation object.
 
std::size_t getIndex () const
 Get index for current iterator state.
 
- Public Member Functions inherited from plask::PolymorphicForwardIterator< ImplT >
 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.
 
PolymorphicForwardIteratoroperator= (const PolymorphicForwardIterator &src)
 
PolymorphicForwardIteratoroperator= (PolymorphicForwardIterator &&src)=default
 

Additional Inherited Members

- Protected Attributes inherited from plask::PolymorphicForwardIterator< ImplT >
std::unique_ptr< ImplTimpl
 

Detailed Description

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

Polymorphic, forward iterator which allow to get index of current position.

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

Template Parameters
ImplTinstantiation of PolymorphicForwardIteratorWithIndexImpl

Definition at line 200 of file iterators.hpp.

Constructor & Destructor Documentation

◆ PolymorphicForwardIteratorWithIndex()

template<typename ImplT >
plask::PolymorphicForwardIteratorWithIndex< ImplT >::PolymorphicForwardIteratorWithIndex ( ImplT impl = nullptr)
inline

Construct iterator which holds given implementation object.

Parameters
implImplementation 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 207 of file iterators.hpp.

Member Function Documentation

◆ getIndex()

template<typename ImplT >
std::size_t plask::PolymorphicForwardIteratorWithIndex< ImplT >::getIndex ( ) const
inline

Get index for current iterator state.

Returns
index for current iterator state

Definition at line 213 of file iterators.hpp.


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