PLaSK library
|
Base class for forward, polymorphic iterators implementations. More...
#include <plask/utils/iterators.hpp>
Public Types | |
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. | |
Public Member Functions | |
virtual ReferenceT | dereference () const =0 |
virtual void | increment ()=0 |
Iterate to next value. | |
virtual | ~PolymorphicForwardIteratorImpl () |
Virtual destructor, do nothing. | |
virtual bool | equal (const PolymorphicForwardIteratorImpl &other) const =0 |
Check if this is equal to other . | |
virtual std::unique_ptr< PolymorphicForwardIteratorImpl< ValueT, ReferenceT > > | clone () const =0 |
Clone this iterator. | |
Base class for forward, polymorphic iterators implementations.
ValueT | Type to iterate over. |
ReferenceT | Type returned by dereference operation. Note that default type is not good if dereference returns temporary object. In such case const ValueT can be a better choice. |
Definition at line 37 of file iterators.hpp.
typedef ReferenceT plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >::reference |
Type to represent a reference to an object pointed by the iterator.
Definition at line 45 of file iterators.hpp.
typedef ValueT plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT >::value_type |
Type of objects pointed by the iterator.
Definition at line 42 of file iterators.hpp.
|
inlinevirtual |
Virtual destructor, do nothing.
Definition at line 54 of file iterators.hpp.
|
pure virtual |
Clone this iterator.
*this
, allocated with new operator (caller is responsible for deleting it) Implemented in plask::EmptyBoundaryImpl::IteratorImpl, plask::UnionBoundarySetImpl::IteratorImpl, plask::DiffBoundarySetImpl::IteratorImpl, plask::IntersectionBoundarySetImpl::IteratorImpl, plask::PredicateBoundaryImpl< MeshT, Predicate >::PredicateIteratorImpl, plask::ExtrudedTriangularMesh3D::ExtrudedTriangularBoundaryImpl::IteratorImpl, plask::ExtrudedTriangularMesh3D::ExtrudedTriangularWholeLayerBoundaryImpl::IteratorImpl, plask::RectangularMaskedMesh2D::BoundaryIteratorImpl< CHANGE_DIR >, plask::RectangularMaskedMesh3D::BoundaryIteratorImpl< CHANGE_DIR_SLOWER, CHANGE_DIR_FASTER >, and plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >.
|
pure virtual |
Implemented in plask::EmptyBoundaryImpl::IteratorImpl, plask::UnionBoundarySetImpl::IteratorImpl, plask::DiffBoundarySetImpl::IteratorImpl, plask::IntersectionBoundarySetImpl::IteratorImpl, plask::PredicateBoundaryImpl< MeshT, Predicate >::PredicateIteratorImpl, plask::ExtrudedTriangularMesh3D::ExtrudedTriangularBoundaryImpl::IteratorImpl, plask::ExtrudedTriangularMesh3D::ExtrudedTriangularWholeLayerBoundaryImpl::IteratorImpl, plask::RectangularMaskedMesh2D::BoundaryIteratorImpl< CHANGE_DIR >, plask::RectangularMaskedMesh3D::BoundaryIteratorImpl< CHANGE_DIR_SLOWER, CHANGE_DIR_FASTER >, and plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >.
|
pure virtual |
Check if this is equal to other
.
Implemented in plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >.
|
pure virtual |
Iterate to next value.
Implemented in plask::EmptyBoundaryImpl::IteratorImpl, plask::UnionBoundarySetImpl::IteratorImpl, plask::DiffBoundarySetImpl::IteratorImpl, plask::IntersectionBoundarySetImpl::IteratorImpl, plask::PredicateBoundaryImpl< MeshT, Predicate >::PredicateIteratorImpl, plask::ExtrudedTriangularMesh3D::ExtrudedTriangularBoundaryImpl::IteratorImpl, plask::ExtrudedTriangularMesh3D::ExtrudedTriangularWholeLayerBoundaryImpl::IteratorImpl, plask::RectangularMaskedMesh2D::BoundaryIteratorImpl< CHANGE_DIR >, plask::RectangularMaskedMesh3D::BoundaryIteratorImpl< CHANGE_DIR_SLOWER, CHANGE_DIR_FASTER >, and plask::PolymorphicForwardIteratorWrapperImpl< wrapped_iterator_type, ValueT, ReferenceT >.