Skip to content

TargetRegionVariable::shape_const_kind_iterator

Iterator which acts as a filter over std::vector::const_iterator (the base_iter) which only passes on TargetRegionVariableShape of the kind specified in Kind.

#include <TargetRegionVariable.h>

Public Types

Name
using std::vector< TargetRegionVariableShape >::const_iterator base_iter
using TargetRegionVariableShape value_type
using const TargetRegionVariableShape & reference
using const TargetRegionVariableShape * pointer
using std::forward_iterator_tag iterator_category
using std::ptrdiff_t difference_type
using TargetRegionVariableShape::ShapeKind ShapeKind

Public Functions

Name
shape_const_kind_iterator()
shape_const_kind_iterator(ShapeKind Kind, base_iter I)
Explicitly constructs an iterator from the base_iter- Both the start and end of the iterator will be set to the same paramter I.
shape_const_kind_iterator(ShapeKind Kind, base_iter I, base_iter End)
Explicitly constructs an iterator from cbegin() and cend() of base_iter.
shape_const_kind_iterator & operator++()
shape_const_kind_iterator operator++(int )
reference operator*() const
pointer operator->()

Private Attributes

Name
base_iter It
base_iter End
TargetRegionVariableShape::ShapeKind Kind

Friends

Name
bool operator==(shape_const_kind_iterator X, shape_const_kind_iterator Y)
bool operator!=(shape_const_kind_iterator X, shape_const_kind_iterator Y)

Public Types Documentation

using base_iter

1
using TargetRegionVariable::shape_const_kind_iterator::base_iter =  std::vector<TargetRegionVariableShape>::const_iterator;

using value_type

1
using TargetRegionVariable::shape_const_kind_iterator::value_type =  TargetRegionVariableShape;

using reference

1
using TargetRegionVariable::shape_const_kind_iterator::reference =  const TargetRegionVariableShape &;

using pointer

1
using TargetRegionVariable::shape_const_kind_iterator::pointer =  const TargetRegionVariableShape *;

using iterator_category

1
using TargetRegionVariable::shape_const_kind_iterator::iterator_category =  std::forward_iterator_tag;

using difference_type

1
using TargetRegionVariable::shape_const_kind_iterator::difference_type =  std::ptrdiff_t;

using ShapeKind

1
using TargetRegionVariable::shape_const_kind_iterator::ShapeKind =  TargetRegionVariableShape::ShapeKind;

Public Functions Documentation

function shape_const_kind_iterator

1
shape_const_kind_iterator()

function shape_const_kind_iterator

1
2
3
4
inline explicit shape_const_kind_iterator(
    ShapeKind Kind,
    base_iter I
)

Explicitly constructs an iterator from the base_iter- Both the start and end of the iterator will be set to the same paramter I.

Use this to construct an end() iterator from std::vector<>::cend().

function shape_const_kind_iterator

1
2
3
4
5
inline explicit shape_const_kind_iterator(
    ShapeKind Kind,
    base_iter I,
    base_iter End
)

Explicitly constructs an iterator from cbegin() and cend() of base_iter.

Use this to construct a begin() from std::vector<>::cbegin() and std::vector<>::cend(). The iterator needs to operate on the base_iter at construction to ensure that a non-empty vector which does not contain elements of the right Kind is handled correctly.

function operator++

1
inline shape_const_kind_iterator & operator++()

function operator++

1
2
3
inline shape_const_kind_iterator operator++(
    int 
)

function operator*

1
inline reference operator*() const

function operator->

1
inline pointer operator->()

Private Attributes Documentation

variable It

1
base_iter It;

variable End

1
base_iter End;

variable Kind

1
TargetRegionVariableShape::ShapeKind Kind;

Friends

friend operator==

1
2
3
4
5
friend bool operator==(
    shape_const_kind_iterator X,

    shape_const_kind_iterator Y
);

friend operator!=

1
2
3
4
5
friend bool operator!=(
    shape_const_kind_iterator X,

    shape_const_kind_iterator Y
);

Last update: 2021-11-24
Back to top