PLaSK library
Loading...
Searching...
No Matches
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.
 
PolymorphicForwardIteratoroperator= (const PolymorphicForwardIterator &src)
 
PolymorphicForwardIteratoroperator= (PolymorphicForwardIterator &&src)=default
 

Protected Attributes

std::unique_ptr< ImplTimpl
 

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
ImplTinstantiation 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
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 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
srcIterator 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
srcIterator to move from.

Member Function Documentation

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ swap()

template<typename ImplT >
void plask::PolymorphicForwardIterator< ImplT >::swap ( PolymorphicForwardIterator< ImplT > &  to_swap)
inlinenoexcept

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

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: