Loading...
Searching...
No Matches
bitpit::ProxyVectorIterator< value_t, container_t > Class Template Reference

Iterator for the class ProxyVector. More...

#include <proxyVector.hpp>

Inheritance diagram for bitpit::ProxyVectorIterator< value_t, container_t >:

Public Types

using difference_type = std::ptrdiff_t
 
using iterator_category = std::bidirectional_iterator_tag
 
using pointer = __PXI_POINTER_TYPE__
 
using reference = __PXI_REFERENCE_TYPE__
 
using value_type = value_t
 

Public Member Functions

 ProxyVectorIterator ()
 
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>
 ProxyVectorIterator (const ProxyVectorIterator< other_value_t, container_t > &other)
 
bool operator!= (const ProxyVectorIterator &other) const
 
__PXI_REFERENCE__ operator* () const
 
ProxyVectorIteratoroperator++ ()
 
ProxyVectorIterator operator++ (int)
 
ProxyVectorIteratoroperator+= (int increment)
 
std::size_t operator- (const ProxyVectorIterator &other)
 
ProxyVectorIteratoroperator-- ()
 
ProxyVectorIterator operator-- (int)
 
__PXI_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>
ProxyVectorIteratoroperator= (const ProxyVectorIterator< other_value_t, container_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>
ProxyVectorIterator< value_t, container_t > & operator= (const ProxyVectorIterator< other_value_t, container_t > &other)
 
bool operator== (const ProxyVectorIterator &other) const
 
void swap (ProxyVectorIterator &other) noexcept
 

Friends

template<typename PXV_value_t, bool PXV_thread_safe>
class ProxyVector
 
class ProxyVectorIterator< typename std::add_const< value_t >::type, container_t >
 

Detailed Description

template<typename value_t, typename container_t>
class bitpit::ProxyVectorIterator< value_t, container_t >

Iterator for the class ProxyVector.

Template Parameters
value_tis the type of the objects handled by the ProxyVector
container_tdefines the type of container where the data is stored

Definition at line 69 of file proxyVector.hpp.

Member Typedef Documentation

◆ difference_type

template<typename value_t, typename container_t>
using bitpit::ProxyVectorIterator< value_t, container_t >::difference_type = std::ptrdiff_t

Difference type

Definition at line 91 of file proxyVector.hpp.

◆ iterator_category

template<typename value_t, typename container_t>
using bitpit::ProxyVectorIterator< value_t, container_t >::iterator_category = std::bidirectional_iterator_tag

Iterator category

Definition at line 81 of file proxyVector.hpp.

◆ pointer

template<typename value_t, typename container_t>
using bitpit::ProxyVectorIterator< value_t, container_t >::pointer = __PXI_POINTER_TYPE__

Pointer type

Definition at line 96 of file proxyVector.hpp.

◆ reference

template<typename value_t, typename container_t>
using bitpit::ProxyVectorIterator< value_t, container_t >::reference = __PXI_REFERENCE_TYPE__

Reference type

Definition at line 101 of file proxyVector.hpp.

◆ value_type

template<typename value_t, typename container_t>
using bitpit::ProxyVectorIterator< value_t, container_t >::value_type = value_t

Value type

Definition at line 86 of file proxyVector.hpp.

Constructor & Destructor Documentation

◆ ProxyVectorIterator() [1/2]

template<typename value_t, typename container_t>
bitpit::ProxyVectorIterator< value_t, container_t >::ProxyVectorIterator ( )

Constructor

Definition at line 34 of file proxyVector.tpp.

◆ ProxyVectorIterator() [2/2]

template<typename value_t, typename container_t>
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>
bitpit::ProxyVectorIterator< value_t, container_t >::ProxyVectorIterator ( const ProxyVectorIterator< other_value_t, container_t > & other)

Constructor

This constructor allows to generate a constant iterator from a non constnat iterator.

Parameters
otheris the iterator that will be copied

Definition at line 49 of file proxyVector.tpp.

Member Function Documentation

◆ operator!=()

template<typename value_t, typename container_t>
bool bitpit::ProxyVectorIterator< value_t, container_t >::operator!= ( const ProxyVectorIterator< value_t, container_t > & other) const
inline

Two-way comparison.

Definition at line 140 of file proxyVector.hpp.

◆ operator*()

template<typename value_t, typename container_t>
__PXI_REFERENCE__ bitpit::ProxyVectorIterator< value_t, container_t >::operator* ( ) const

Deference operator.

Returns
A reference to the element currently pointed to by the iterator.

Definition at line 133 of file proxyVector.tpp.

◆ operator++() [1/2]

template<typename value_t, typename container_t>
ProxyVectorIterator< value_t, container_t > & bitpit::ProxyVectorIterator< value_t, container_t >::operator++ ( )

Pre-increment operator.

Definition at line 70 of file proxyVector.tpp.

◆ operator++() [2/2]

template<typename value_t, typename container_t>
ProxyVectorIterator< value_t, container_t > bitpit::ProxyVectorIterator< value_t, container_t >::operator++ ( int )

Post-increment operator.

Definition at line 81 of file proxyVector.tpp.

◆ operator+=()

template<typename value_t, typename container_t>
ProxyVectorIterator< value_t, container_t > & bitpit::ProxyVectorIterator< value_t, container_t >::operator+= ( int increment)

Compound assigment operator.

Parameters
incrementis the increment

Definition at line 120 of file proxyVector.tpp.

◆ operator-()

template<typename value_t, typename container_t>
std::size_t bitpit::ProxyVectorIterator< value_t, container_t >::operator- ( const ProxyVectorIterator< value_t, container_t > & other)

Distance operator.

Parameters
otheris the iterator from which the distance will be evaluated
Returns
The distance between the specified iterator.

Definition at line 181 of file proxyVector.tpp.

◆ operator--() [1/2]

template<typename value_t, typename container_t>
ProxyVectorIterator< value_t, container_t > & bitpit::ProxyVectorIterator< value_t, container_t >::operator-- ( )

Pre-decrement operator.

Definition at line 94 of file proxyVector.tpp.

◆ operator--() [2/2]

template<typename value_t, typename container_t>
ProxyVectorIterator< value_t, container_t > bitpit::ProxyVectorIterator< value_t, container_t >::operator-- ( int )

Post-decrement operator.

Definition at line 105 of file proxyVector.tpp.

◆ operator->()

template<typename value_t, typename container_t>
__PXI_POINTER__ bitpit::ProxyVectorIterator< value_t, container_t >::operator-> ( ) const

Deference operator.

Returns
A reference to the element currently pointed to by the iterator.

Definition at line 144 of file proxyVector.tpp.

◆ operator=()

template<typename value_t, typename container_t>
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>
ProxyVectorIterator< value_t, container_t > & bitpit::ProxyVectorIterator< value_t, container_t >::operator= ( const ProxyVectorIterator< other_value_t, container_t > & other)

Copy assignment operator to create a constant iterator from a non-constant one.

Parameters
otheris the iterator that will be copied

Definition at line 157 of file proxyVector.tpp.

◆ operator==()

template<typename value_t, typename container_t>
bool bitpit::ProxyVectorIterator< value_t, container_t >::operator== ( const ProxyVectorIterator< value_t, container_t > & other) const
inline

Two-way comparison.

Definition at line 132 of file proxyVector.hpp.

◆ swap()

template<typename value_t, typename container_t>
void bitpit::ProxyVectorIterator< value_t, container_t >::swap ( ProxyVectorIterator< value_t, container_t > & other)
noexcept

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

Parameters
otheris the iterator to exchange values with

Definition at line 61 of file proxyVector.tpp.

Friends And Related Symbol Documentation

◆ ProxyVector

template<typename value_t, typename container_t>
template<typename PXV_value_t, bool PXV_thread_safe>
friend class ProxyVector
friend

Definition at line 73 of file proxyVector.hpp.

◆ ProxyVectorIterator< typename std::add_const< value_t >::type, container_t >

template<typename value_t, typename container_t>
friend class ProxyVectorIterator< typename std::add_const< value_t >::type, container_t >
friend

Definition at line 73 of file proxyVector.hpp.


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