Base class for a random access iterator over positions in a set.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/IteratorBase.hpp>
template<typename IterType, typename PosType>
class axom::IteratorBase< IterType, PosType >
Base class for a random access iterator over positions in a set.
This class is for keeping track of the position value in an iterator class. It uses the Curiously Recurring Template Pattern (CRTP): The first template parameter should be the actual iterator class.
The derived iterator class must implement void advance(PositionType)
to update the m_pos variable. e.g.
class IteratorDerived :
public IteratorBase < IteratorDerived, PositionType >
{
protected:
void advance( PositionType n) {...}
};
PosType m_pos
Definition: IteratorBase.hpp:213
IteratorBase()
Definition: IteratorBase.hpp:53
- Template Parameters
-
IterType | The iterator class to be the derived class |
PosType | The type used to index into the iterator Must be a signed integral type |
◆ iterator
template<typename IterType , typename PosType >
◆ IteratorBase() [1/2]
template<typename IterType , typename PosType >
◆ IteratorBase() [2/2]
template<typename IterType , typename PosType >
◆ operator++() [1/2]
template<typename IterType , typename PosType >
◆ operator++() [2/2]
template<typename IterType , typename PosType >
◆ operator--() [1/2]
template<typename IterType , typename PosType >
◆ operator--() [2/2]
template<typename IterType , typename PosType >
◆ operator+=()
template<typename IterType , typename PosType >
Addition-assignment operator.
◆ operator-=()
template<typename IterType , typename PosType >
Subtraction-assignment operator.
◆ operator==
template<typename IterType , typename PosType >
◆ operator!=
template<typename IterType , typename PosType >
◆ operator<
template<typename IterType , typename PosType >
◆ operator<=
template<typename IterType , typename PosType >
Less than or equal operator.
◆ operator>
template<typename IterType , typename PosType >
◆ operator>=
template<typename IterType , typename PosType >
Greater than or equal operator.
◆ operator+ [1/2]
template<typename IterType , typename PosType >
IterType operator+ |
( |
const IterType & |
it, |
|
|
PosType |
n |
|
) |
| |
|
friend |
Addition operator with iterator on left and position on right.
◆ operator+ [2/2]
template<typename IterType , typename PosType >
IterType operator+ |
( |
PosType |
n, |
|
|
const IterType & |
it |
|
) |
| |
|
friend |
Addition operator with position on left and iterator on right.
◆ operator- [1/3]
template<typename IterType , typename PosType >
IterType operator- |
( |
const IterType & |
it, |
|
|
PosType |
n |
|
) |
| |
|
friend |
Subtraction operator with iterator on left and position on right.
◆ operator- [2/3]
template<typename IterType , typename PosType >
IterType operator- |
( |
PosType |
n, |
|
|
const IterType & |
it |
|
) |
| |
|
friend |
Subtraction operator with position on left and iterator on right.
◆ operator- [3/3]
template<typename IterType , typename PosType >
PosType operator- |
( |
const IterType & |
a, |
|
|
const IterType & |
b |
|
) |
| |
|
friend |
◆ m_pos
template<typename IterType , typename PosType >
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/IteratorBase.hpp