Iterator for the class PiercedKernel. More...
#include <piercedKernelIterator.hpp>

Public Types | |
using | difference_type = std::ptrdiff_t |
typedef id_t | id_type |
using | iterator_category = std::bidirectional_iterator_tag |
typedef kernel_t | kernel_type |
using | pointer = id_t * |
using | reference = id_t & |
using | value_type = id_t |
Public Member Functions | |
PiercedKernelIterator () | |
id_t | getId (const id_t &fallback=-1) const noexcept |
const kernel_type & | getKernel () const |
std::size_t | getPos () const noexcept |
std::size_t | getRawIndex () const noexcept |
bool | operator!= (const PiercedKernelIterator &rhs) const |
const id_t & | operator* () const |
PiercedKernelIterator & | operator++ () |
PiercedKernelIterator | operator++ (int) |
PiercedKernelIterator & | operator-- () |
PiercedKernelIterator | operator-- (int) |
const id_t * | operator-> () const |
bool | operator== (const PiercedKernelIterator &rhs) const |
void | swap (PiercedKernelIterator &other) noexcept |
Friends | |
template<typename PK_id_t> | |
class | PiercedKernel |
template<typename PSI_value_t, typename PSI_id_t, typename PSI_value_no_cv_t> | |
class | PiercedStorageIterator |
Detailed Description
class bitpit::PiercedKernelIterator< id_t >
Iterator for the class PiercedKernel.
- Template Parameters
-
id_t is the type of ids associated to the elements
Definition at line 46 of file piercedKernelIterator.hpp.
Member Typedef Documentation
◆ difference_type
using bitpit::PiercedKernelIterator< id_t >::difference_type = std::ptrdiff_t |
Difference type
Definition at line 84 of file piercedKernelIterator.hpp.
◆ id_type
typedef id_t bitpit::PiercedKernelIterator< id_t >::id_type |
Type of ids in the kernel
Definition at line 104 of file piercedKernelIterator.hpp.
◆ iterator_category
using bitpit::PiercedKernelIterator< id_t >::iterator_category = std::bidirectional_iterator_tag |
Iterator category
Definition at line 74 of file piercedKernelIterator.hpp.
◆ kernel_type
typedef kernel_t bitpit::PiercedKernelIterator< id_t >::kernel_type |
Kernel type
Definition at line 99 of file piercedKernelIterator.hpp.
◆ pointer
using bitpit::PiercedKernelIterator< id_t >::pointer = id_t * |
Pointer type
Definition at line 89 of file piercedKernelIterator.hpp.
◆ reference
using bitpit::PiercedKernelIterator< id_t >::reference = id_t & |
Reference type
Definition at line 94 of file piercedKernelIterator.hpp.
◆ value_type
using bitpit::PiercedKernelIterator< id_t >::value_type = id_t |
Value type
Definition at line 79 of file piercedKernelIterator.hpp.
Constructor & Destructor Documentation
◆ PiercedKernelIterator()
bitpit::PiercedKernelIterator< id_t >::PiercedKernelIterator | ( | ) |
Creates a new uninitialized iterator
Definition at line 34 of file piercedKernelIterator.tpp.
Member Function Documentation
◆ getId()
|
noexcept |
Gets the id of the current element.
- Returns
- The id of the current element or the fallback value if the iterator points to an invalid position.
Definition at line 80 of file piercedKernelIterator.tpp.
◆ getKernel()
const PiercedKernelIterator< id_t >::kernel_type & bitpit::PiercedKernelIterator< id_t >::getKernel | ( | ) | const |
Get a constant reference of the kernel associated with the iterator.
- Returns
- A constant reference of the kernel associated with the iterator.
Definition at line 68 of file piercedKernelIterator.tpp.
◆ getPos()
|
noexcept |
Gets the position of the current element.
- Returns
- The position of the current element.
Definition at line 114 of file piercedKernelIterator.tpp.
◆ getRawIndex()
|
noexcept |
Gets the position of the current element.
- Returns
- The position of the current element.
Definition at line 103 of file piercedKernelIterator.tpp.
◆ operator!=()
|
inline |
Two-way comparison.
Definition at line 140 of file piercedKernelIterator.hpp.
◆ operator*()
const id_t & bitpit::PiercedKernelIterator< id_t >::operator* | ( | ) | const |
Deference operator.
- Returns
- A reference to the element currently pointed to by the iterator.
Definition at line 223 of file piercedKernelIterator.tpp.
◆ operator++() [1/2]
PiercedKernelIterator< id_t > & bitpit::PiercedKernelIterator< id_t >::operator++ | ( | ) |
Pre-increment operator.
Increment operator does not check whether it crosses the end() of the container. Thus, calling this function if the iterator is already at the end of the container results in undefined behavior.
Definition at line 127 of file piercedKernelIterator.tpp.
◆ operator++() [2/2]
PiercedKernelIterator< id_t > bitpit::PiercedKernelIterator< id_t >::operator++ | ( | int | ) |
Post-increment operator.
Increment operator does not check whether it crosses the end() of the container. Thus, calling this function if the iterator is already at the end of the container results in undefined behavior.
Definition at line 159 of file piercedKernelIterator.tpp.
◆ operator--() [1/2]
PiercedKernelIterator< id_t > & bitpit::PiercedKernelIterator< id_t >::operator-- | ( | ) |
Pre-decrement operator.
Decrement operator does not check whether it crosses the begin() of the container. Thus, calling this function if the iterator is already at the begin of the container results in undefined behavior.
Definition at line 176 of file piercedKernelIterator.tpp.
◆ operator--() [2/2]
PiercedKernelIterator< id_t > bitpit::PiercedKernelIterator< id_t >::operator-- | ( | int | ) |
Post-decrement operator.
Decrement operator does not check whether it crosses the begin() of the container. Thus, calling this function if the iterator is already at the begin of the container results in undefined behavior.
Definition at line 208 of file piercedKernelIterator.tpp.
◆ operator->()
const id_t * bitpit::PiercedKernelIterator< id_t >::operator-> | ( | ) | const |
Deference operator.
- Returns
- A reference to the element currently pointed to by the iterator.
Definition at line 234 of file piercedKernelIterator.tpp.
◆ operator==()
|
inline |
Two-way comparison.
Definition at line 132 of file piercedKernelIterator.hpp.
◆ swap()
|
noexcept |
Exchanges the values of the current iterator and the iterator recevied as argument.
- Parameters
-
other the iterator to exchange values with
Definition at line 56 of file piercedKernelIterator.tpp.
Friends And Related Symbol Documentation
◆ PiercedKernel
Definition at line 50 of file piercedKernelIterator.hpp.
◆ PiercedStorageIterator
|
friend |
Definition at line 53 of file piercedKernelIterator.hpp.
The documentation for this class was generated from the following files:
- src/containers/piercedKernelIterator.hpp
- src/containers/piercedKernelIterator.tpp
