Iterator for the class PiercedStorage. More...
#include <piercedStorageIterator.hpp>
Public Types | |
typedef std::ptrdiff_t | difference_type |
typedef id_t | id_type |
typedef std::bidirectional_iterator_tag | iterator_category |
typedef std::conditional< std::is_const< value_t >::value, typenameStorage< value_no_cv_t, id_t >::const_pointer, typenameStorage< value_no_cv_t, id_t >::pointer >::type | pointer |
typedef std::conditional< std::is_const< value_t >::value, typenameStorage< value_no_cv_t, id_t >::const_reference, typenameStorage< value_no_cv_t, id_t >::reference >::type | reference |
typedef storage_t | storage_type |
typedef value_t | value_type |
Public Member Functions | |
PiercedStorageIterator () | |
template<typename other_value_t , typename std::enable_if< std::is_const< value_t >::value &&!std::is_const< other_value_t >::value &&std::is_same< other_value_t, typename std::remove_cv< value_t >::type >::value, int >::type = 0> | |
PiercedStorageIterator (const PiercedStorageIterator< other_value_t, id_t, value_no_cv_t > &other) | |
const PiercedKernelIterator< id_t > & | getKernelIterator () const |
storage_type & | getStorage () const |
__PSI_REFERENCE__ | getValue (std::size_t k=0) const |
bool | operator!= (const PiercedStorageIterator &rhs) const |
__PSI_REFERENCE__ | operator* () const |
PiercedStorageIterator & | operator++ () |
PiercedStorageIterator | operator++ (int) |
PiercedStorageIterator & | operator-- () |
PiercedStorageIterator | operator-- (int) |
__PSI_POINTER__ | operator-> () const |
template<typename other_value_t , typename std::enable_if< std::is_const< value_t >::value &&!std::is_const< other_value_t >::value &&std::is_same< other_value_t, typename std::remove_cv< value_t >::type >::value, int >::type = 0> | |
PiercedStorageIterator & | operator= (const PiercedStorageIterator< other_value_t, id_t, value_no_cv_t > &other) |
template<typename other_value_t , typename std::enable_if< std::is_const< value_t >::value &&!std::is_const< other_value_t >::value &&std::is_same< other_value_t, typename std::remove_cv< value_t >::type >::value, int >::type > | |
PiercedStorageIterator< value_t, id_t, value_no_cv_t > & | operator= (const PiercedStorageIterator< other_value_t, id_t, value_no_cv_t > &other) |
bool | operator== (const PiercedStorageIterator &rhs) const |
void | swap (PiercedStorageIterator &other) noexcept |
Friends | |
template<typename PS_value_t , typename PS_id_t > | |
class | PiercedStorage |
class | PiercedStorageIterator< typename std::add_const< value_t >::type, id_t, value_no_cv_t > |
Additional Inherited Members | |
Protected Types inherited from bitpit::PiercedKernelIterator< id_t > | |
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 |
Protected Member Functions inherited from bitpit::PiercedKernelIterator< id_t > | |
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 |
Iterator for the class PiercedStorage.
value_t | is the type of elements in the storage |
id_t | is the type of ids associated to the elements |
Definition at line 51 of file piercedStorageIterator.hpp.
typedef std::ptrdiff_t bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::difference_type |
Difference type
Definition at line 100 of file piercedStorageIterator.hpp.
typedef id_t bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::id_type |
Id type
Definition at line 85 of file piercedStorageIterator.hpp.
typedef std::bidirectional_iterator_tag bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::iterator_category |
Iterator category
Definition at line 90 of file piercedStorageIterator.hpp.
typedef std::conditional<std::is_const<value_t>::value,typenameStorage<value_no_cv_t,id_t>::const_pointer,typenameStorage<value_no_cv_t,id_t>::pointer>::type bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::pointer |
Pointer type
Definition at line 111 of file piercedStorageIterator.hpp.
typedef std::conditional<std::is_const<value_t>::value,typenameStorage<value_no_cv_t,id_t>::const_reference,typenameStorage<value_no_cv_t,id_t>::reference>::type bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::reference |
Reference type
Definition at line 122 of file piercedStorageIterator.hpp.
typedef storage_t bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::storage_type |
Constant container
Definition at line 127 of file piercedStorageIterator.hpp.
typedef value_t bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::value_type |
Value type
Definition at line 95 of file piercedStorageIterator.hpp.
bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::PiercedStorageIterator | ( | ) |
Creates a new uninitialized iterator
Definition at line 34 of file piercedStorageIterator.tpp.
bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::PiercedStorageIterator | ( | const PiercedStorageIterator< other_value_t, id_t, value_no_cv_t > & | other | ) |
Creates a new constant iterator pointing to the same position of the specified iterator.
other | is the iterator that will be copied |
Definition at line 47 of file piercedStorageIterator.tpp.
const PiercedKernelIterator< id_t > & bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::getKernelIterator | ( | ) | const |
Get a constant reference to the kernel iterator.
Definition at line 104 of file piercedStorageIterator.tpp.
PiercedStorageIterator< value_t, id_t, value_no_cv_t >::storage_type & bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::getStorage | ( | ) | const |
Get a constant reference of the storage associated with the iterator.
Definition at line 93 of file piercedStorageIterator.tpp.
__PSI_REFERENCE__ bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::getValue | ( | std::size_t | k = 0 | ) | const |
Gets the values of the current element.
k | is the index of the requested field |
Definition at line 116 of file piercedStorageIterator.tpp.
|
inline |
Two-way comparison.
Definition at line 172 of file piercedStorageIterator.hpp.
__PSI_REFERENCE__ bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::operator* | ( | ) | const |
Deference operator.
Definition at line 199 of file piercedStorageIterator.tpp.
PiercedStorageIterator< value_t, id_t, value_no_cv_t > & bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_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 135 of file piercedStorageIterator.tpp.
PiercedStorageIterator< value_t, id_t, value_no_cv_t > bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_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 150 of file piercedStorageIterator.tpp.
PiercedStorageIterator< value_t, id_t, value_no_cv_t > & bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_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 168 of file piercedStorageIterator.tpp.
PiercedStorageIterator< value_t, id_t, value_no_cv_t > bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_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 183 of file piercedStorageIterator.tpp.
__PSI_POINTER__ bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::operator-> | ( | ) | const |
Deference operator.
Definition at line 212 of file piercedStorageIterator.tpp.
PiercedStorageIterator< value_t, id_t, value_no_cv_t > & bitpit::PiercedStorageIterator< value_t, id_t, value_no_cv_t >::operator= | ( | const PiercedStorageIterator< other_value_t, id_t, value_no_cv_t > & | other | ) |
Copy assignment operator to create a constant iterator from a non-constant one.
other | is the iterator that will be copied |
Definition at line 227 of file piercedStorageIterator.tpp.
|
inline |
Two-way comparison.
Definition at line 164 of file piercedStorageIterator.hpp.
|
noexcept |
Exchanges the values of the current iterator and the iterator recevied as argument.
other | the iterator to exchange values with |
Definition at line 80 of file piercedStorageIterator.tpp.
|
friend |
Definition at line 58 of file piercedStorageIterator.hpp.
|
friend |
Definition at line 1 of file piercedStorageIterator.hpp.