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

Description:

template<typename T, typename TRecycling>
template<typename TConstOrMutableElement>
struct alib::monomem::List< 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 126 of file list.hpp.

#include <list.hpp>

Collaboration diagram for List< 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
 
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
 

Type Definition Details:

◆ difference_type

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
using difference_type = integer

Implementation of std::iterator_traits.

Definition at line 130 of file list.hpp.

◆ iterator_category

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

Implementation of std::iterator_traits.

Definition at line 128 of file list.hpp.

◆ pointer

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
using pointer = TConstOrMutableElement*

Implementation of std::iterator_traits.

Definition at line 131 of file list.hpp.

◆ reference

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
using reference = TConstOrMutableElement&

Implementation of std::iterator_traits.

Definition at line 132 of file list.hpp.

◆ value_type

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
using value_type = TConstOrMutableElement

Implementation of std::iterator_traits.

Definition at line 129 of file list.hpp.

Field Details:

◆ element

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
Element* element
private

The actual element of the list.

Definition at line 135 of file list.hpp.

Constructor(s) / Destructor Details::

◆ TIterator() [1/3]

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TIterator ( )
default

Default constructor creating an invalid iterator.

◆ TIterator() [2/3]

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TIterator ( Element * start)
inlineexplicit

Constructor.

Parameters
startPointer to the initial element.

Definition at line 149 of file list.hpp.

◆ TIterator() [3/3]

template<typename T , typename TRecycling >
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 T , typename TRecycling >
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 200 of file list.hpp.

◆ operator*()

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TConstOrMutableElement & operator* ( ) const
inline

Retrieves a reference to the referred element.

Returns
A reference to the referred element.

Definition at line 228 of file list.hpp.

◆ operator++() [1/2]

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TIterator & operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 173 of file list.hpp.

Here is the call graph for this function:

◆ operator++() [2/2]

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TIterator operator++ ( int )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet.

Definition at line 181 of file list.hpp.

Here is the call graph for this function:

◆ operator--() [1/2]

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TIterator & operator-- ( )
inline

Prefix decrement operator.

Returns
A reference to this object.

Definition at line 209 of file list.hpp.

Here is the call graph for this function:

◆ operator--() [2/2]

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TIterator operator-- ( int )
inline

Postfix decrement operator.

Returns
The iterator value prior the decrement operation.

Definition at line 217 of file list.hpp.

Here is the call graph for this function:

◆ operator->()

template<typename T , typename TRecycling >
template<typename TConstOrMutableElement >
TConstOrMutableElement * operator-> ( ) const
inline

Retrieves a pointer to the referred element.

Returns
A pointer to the referred element.

Definition at line 235 of file list.hpp.

◆ operator==()

template<typename T , typename TRecycling >
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 192 of file list.hpp.


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