ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Types | Public Methods | Private Fields | List of all members
List< T, TRecycling >::TIterator< TConstOrMutableElement > Struct Template Reference

#include <list.hpp>

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

Class Description

template<typename T, typename TRecycling>
template<typename TConstOrMutableElement>
struct aworx::lib::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.

Public Types

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 Methods

 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
 

Private Fields

Elementelement
 

Constructor & Destructor Documentation

◆ TIterator() [1/3]

TIterator ( )
default

Default constructor creating an invalid iterator.

◆ TIterator() [2/3]

TIterator ( Element start)
inlineexplicit

Constructor.

Parameters
startPointer to the initial element.

Definition at line 150 of file list.hpp.

◆ TIterator() [3/3]

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.

Member Function Documentation

◆ operator!=()

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 201 of file list.hpp.

◆ operator*()

TConstOrMutableElement& operator* ( ) const
inline

Retrieves a reference to the referred element.

Returns
A reference to the referred element.

Definition at line 229 of file list.hpp.

◆ operator++() [1/2]

TIterator& operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 174 of file list.hpp.

Here is the call graph for this function:

◆ operator++() [2/2]

TIterator operator++ ( int  )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet.

Definition at line 182 of file list.hpp.

Here is the call graph for this function:

◆ operator--() [1/2]

TIterator& operator-- ( )
inline

Prefix decrement operator.

Returns
A reference to this object.

Definition at line 210 of file list.hpp.

Here is the call graph for this function:

◆ operator--() [2/2]

TIterator operator-- ( int  )
inline

Postfix decrement operator.

Returns
The iterator value prior the decrement operation.

Definition at line 218 of file list.hpp.

Here is the call graph for this function:

◆ operator->()

TConstOrMutableElement* operator-> ( ) const
inline

Retrieves a pointer to the referred element.

Returns
A pointer to the referred element.

Definition at line 236 of file list.hpp.

◆ operator==()

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 193 of file list.hpp.

Member Data Documentation

◆ element

Element* element
private

The start of the list.

Definition at line 136 of file list.hpp.


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