ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
List< TAllocator, T, TRecycling >::TIterator< TConstOrMutableElement > Struct Template Reference

Description:

template<typename TAllocator, typename T, Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement>
struct alib::containers::List< TAllocator, T, TRecycling >::TIterator< TConstOrMutableElement >

Implementation of std::iterator_traits for this container.

As the name of the class indicates, this iterator satisfies the C++ standard library concept BidirectionalIterator .

Template Parameters
TConstOrMutableElementThe custom data type as either const or mutable.

Definition at line 121 of file list.hpp.

#include <list.hpp>

Collaboration diagram for List< TAllocator, T, TRecycling >::TIterator< TConstOrMutableElement >:
[legend]

Public Type Index:

using difference_type = integer
 Implementation of std::iterator_traits.
 
using iterator_category = std::bidirectional_iterator_tag
 Implementation of std::iterator_traits.
 
using pointer = TConstOrMutableElement*
 Implementation of std::iterator_traits.
 
using reference = TConstOrMutableElement&
 Implementation of std::iterator_traits.
 
using value_type = TConstOrMutableElement
 Implementation of std::iterator_traits.
 

Public Method Index:

 TIterator ()=default
 Default constructor creating an invalid iterator.
 
template<typename TMutable >
 TIterator (const TMutable &mutableIt)
 
 TIterator (Element *start)
 
bool operator!= (TIterator other) const
 
TConstOrMutableElement & operator* () const
 
TIteratoroperator++ ()
 
TIterator operator++ (int)
 
TIteratoroperator-- ()
 
TIterator operator-- (int)
 
TConstOrMutableElement * operator-> () const
 
bool operator== (TIterator other) const
 

Protected Field Index:

Elementelement
 The actual element of the list.
 

Type Definition Details:

◆ difference_type

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
using difference_type = integer

Implementation of std::iterator_traits.

Definition at line 125 of file list.hpp.

◆ iterator_category

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
using iterator_category = std::bidirectional_iterator_tag

Implementation of std::iterator_traits.

Definition at line 123 of file list.hpp.

◆ pointer

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
using pointer = TConstOrMutableElement*

Implementation of std::iterator_traits.

Definition at line 126 of file list.hpp.

◆ reference

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
using reference = TConstOrMutableElement&

Implementation of std::iterator_traits.

Definition at line 127 of file list.hpp.

◆ value_type

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
using value_type = TConstOrMutableElement

Implementation of std::iterator_traits.

Definition at line 124 of file list.hpp.

Field Details:

◆ element

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
Element* element
protected

The actual element of the list.

Definition at line 130 of file list.hpp.

Constructor(s) / Destructor Details:

◆ TIterator() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TIterator ( Element * start)
inlineexplicit

Constructor.

Parameters
startPointer to the initial element.

Definition at line 143 of file list.hpp.

◆ TIterator() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
template<typename TMutable >
TIterator ( const TMutable & mutableIt)

Copy constructor accepting a mutable iterator. Available only for the constant version of this iterator.

Template Parameters
TMutableThe type of this constructor's argument.
Parameters
mutableItMutable iterator to copy from.

Method Details:

◆ operator!=()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
bool operator!= ( TIterator< TConstOrMutableElement > other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and given iterator are not equal, false otherwise.

Definition at line 194 of file list.hpp.

◆ operator*()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TConstOrMutableElement & operator* ( ) const
inline

Retrieves a reference to the referred element.

Returns
A reference to the referred element.

Definition at line 222 of file list.hpp.

◆ operator++() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TIterator & operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 167 of file list.hpp.

Here is the call graph for this function:

◆ operator++() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TIterator operator++ ( int )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet.

Definition at line 175 of file list.hpp.

Here is the call graph for this function:

◆ operator--() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TIterator & operator-- ( )
inline

Prefix decrement operator.

Returns
A reference to this object.

Definition at line 203 of file list.hpp.

Here is the call graph for this function:

◆ operator--() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TIterator operator-- ( int )
inline

Postfix decrement operator.

Returns
The iterator value prior the decrement operation.

Definition at line 211 of file list.hpp.

Here is the call graph for this function:

◆ operator->()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
TConstOrMutableElement * operator-> ( ) const
inline

Retrieves a pointer to the referred element.

Returns
A pointer to the referred element.

Definition at line 226 of file list.hpp.

◆ operator==()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TConstOrMutableElement >
bool operator== ( TIterator< TConstOrMutableElement > other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and the given iterator are pointing to the same element, false otherwise.

Definition at line 186 of file list.hpp.


The documentation for this struct was generated from the following file: