PLaSK library
Loading...
Searching...
No Matches
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()

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()

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()

◆ equal()

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()

Member Data Documentation

◆ wrapped_iterator


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