Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
bitpit::PiercedKernelIterator< id_t > Class Template Reference

Iterator for the class PiercedKernel. More...

#include <piercedKernelIterator.hpp>

Inheritance diagram for bitpit::PiercedKernelIterator< id_t >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::PiercedKernelIterator< id_t >:
Collaboration graph
[legend]

Public Types

typedef std::ptrdiff_t difference_type
 
typedef id_t id_type
 
typedef std::bidirectional_iterator_tag iterator_category
 
typedef kernel_t kernel_type
 
typedef const id_t * pointer
 
typedef const id_t & reference
 
typedef id_t value_type
 

Public Member Functions

 PiercedKernelIterator ()
 
id_t getId (const id_t &fallback=-1) const noexcept
 
const kernel_typegetKernel () const
 
std::size_t getPos () const noexcept
 
std::size_t getRawIndex () const noexcept
 
bool operator!= (const PiercedKernelIterator &rhs) const
 
const id_t & operator* () const
 
PiercedKernelIteratoroperator++ ()
 
PiercedKernelIterator operator++ (int)
 
PiercedKernelIteratoroperator-- ()
 
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

template<typename id_t = long>
class bitpit::PiercedKernelIterator< id_t >

Iterator for the class PiercedKernel.

Template Parameters
id_tis the type of ids associated to the elements

Definition at line 46 of file piercedKernelIterator.hpp.

Member Typedef Documentation

◆ difference_type

template<typename id_t = long>
typedef std::ptrdiff_t bitpit::PiercedKernelIterator< id_t >::difference_type

Difference type

Definition at line 85 of file piercedKernelIterator.hpp.

◆ id_type

template<typename id_t = long>
typedef id_t bitpit::PiercedKernelIterator< id_t >::id_type

Type of ids in the kernel

Definition at line 105 of file piercedKernelIterator.hpp.

◆ iterator_category

template<typename id_t = long>
typedef std::bidirectional_iterator_tag bitpit::PiercedKernelIterator< id_t >::iterator_category

Iterator category

Definition at line 75 of file piercedKernelIterator.hpp.

◆ kernel_type

template<typename id_t = long>
typedef kernel_t bitpit::PiercedKernelIterator< id_t >::kernel_type

Kernel type

Definition at line 100 of file piercedKernelIterator.hpp.

◆ pointer

template<typename id_t = long>
typedef const id_t* bitpit::PiercedKernelIterator< id_t >::pointer

Pointer type

Definition at line 90 of file piercedKernelIterator.hpp.

◆ reference

template<typename id_t = long>
typedef const id_t& bitpit::PiercedKernelIterator< id_t >::reference

Reference type

Definition at line 95 of file piercedKernelIterator.hpp.

◆ value_type

template<typename id_t = long>
typedef id_t bitpit::PiercedKernelIterator< id_t >::value_type

Value type

Definition at line 80 of file piercedKernelIterator.hpp.

Constructor & Destructor Documentation

◆ PiercedKernelIterator()

template<typename id_t >
bitpit::PiercedKernelIterator< id_t >::PiercedKernelIterator ( )

Creates a new uninitialized iterator

Definition at line 34 of file piercedKernelIterator.tpp.

Member Function Documentation

◆ getId()

template<typename id_t >
id_t bitpit::PiercedKernelIterator< id_t >::getId ( const id_t & fallback = -1) const
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()

template<typename id_t >
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()

template<typename id_t >
std::size_t bitpit::PiercedKernelIterator< id_t >::getPos ( ) const
noexcept

Gets the position of the current element.

Returns
The position of the current element.

Definition at line 114 of file piercedKernelIterator.tpp.

◆ getRawIndex()

template<typename id_t >
std::size_t bitpit::PiercedKernelIterator< id_t >::getRawIndex ( ) const
noexcept

Gets the position of the current element.

Returns
The position of the current element.

Definition at line 103 of file piercedKernelIterator.tpp.

◆ operator!=()

template<typename id_t = long>
bool bitpit::PiercedKernelIterator< id_t >::operator!= ( const PiercedKernelIterator< id_t > & rhs) const
inline

Two-way comparison.

Definition at line 141 of file piercedKernelIterator.hpp.

◆ operator*()

template<typename id_t >
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]

template<typename id_t >
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]

template<typename id_t >
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]

template<typename id_t >
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]

template<typename id_t >
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->()

template<typename id_t >
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==()

template<typename id_t = long>
bool bitpit::PiercedKernelIterator< id_t >::operator== ( const PiercedKernelIterator< id_t > & rhs) const
inline

Two-way comparison.

Definition at line 133 of file piercedKernelIterator.hpp.

◆ swap()

template<typename id_t >
void bitpit::PiercedKernelIterator< id_t >::swap ( PiercedKernelIterator< id_t > & other)
noexcept

Exchanges the values of the current iterator and the iterator recevied as argument.

Parameters
otherthe iterator to exchange values with

Definition at line 56 of file piercedKernelIterator.tpp.

Friends And Related Symbol Documentation

◆ PiercedKernel

template<typename id_t = long>
template<typename PK_id_t >
friend class PiercedKernel
friend

Definition at line 51 of file piercedKernelIterator.hpp.

◆ PiercedStorageIterator

template<typename id_t = long>
template<typename PSI_value_t , typename PSI_id_t , typename PSI_value_no_cv_t >
friend class PiercedStorageIterator
friend

Definition at line 54 of file piercedKernelIterator.hpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---