utils-lists 4.0.2
The µOS++ Intrusive Lists
Loading...
Searching...
No Matches
micro_os_plus::utils::double_list_iterator< T, N, U > Class Template Reference

A class template for a doubly linked list forward iterator. More...

#include <micro-os-plus/utils/lists.h>

Public Types

using difference_type = ptrdiff_t
 Type of pointer difference.
 
using iterator_category = std::forward_iterator_tag
 Category of iterator.
 
using iterator_pointer = N*
 Type of reference to the iterator internal pointer.
 
using pointer = value_type*
 Type of pointer to object "pointed to" by the iterator.
 
using reference = value_type&
 Type of reference to object "pointed to" by the iterator.
 
using value_type = U
 Type of value "pointed to" by the iterator.
 

Public Member Functions

constexpr double_list_iterator ()
 
constexpr double_list_iterator (iterator_pointer const node)
 
constexpr double_list_iterator (reference element)
 
constexpr iterator_pointer get_iterator_pointer () const
 
constexpr pointer get_pointer () const
 
constexpr bool operator!= (const double_list_iterator &other) const
 
constexpr reference operator* () const
 
constexpr double_list_iteratoroperator++ ()
 
constexpr double_list_iterator operator++ (int)
 
constexpr double_list_iteratoroperator-- ()
 
constexpr double_list_iterator operator-- (int)
 
constexpr pointer operator-> () const
 
constexpr bool operator== (const double_list_iterator &other) const
 

Protected Attributes

iterator_pointer node_
 Pointer to the node.
 

Detailed Description

template<class T, class N = T, class U = T>
class micro_os_plus::utils::double_list_iterator< T, N, U >

A class template for a doubly linked list forward iterator.

Template Parameters
TType of object returned by the iterator.
NType of intrusive node. Must have the public members previous & next.
UType stored in the list, derived from T.

This class provides an interface similar to std::list::iterator.

In a common doubly linked list, all types are double_list_links.

Definition at line 367 of file lists.h.

Member Typedef Documentation

◆ difference_type

template<class T, class N = T, class U = T>
using micro_os_plus::utils::double_list_iterator< T, N, U >::difference_type = ptrdiff_t

Type of pointer difference.

Definition at line 393 of file lists.h.

◆ iterator_category

template<class T, class N = T, class U = T>
using micro_os_plus::utils::double_list_iterator< T, N, U >::iterator_category = std::forward_iterator_tag

Category of iterator.

Definition at line 398 of file lists.h.

◆ iterator_pointer

template<class T, class N = T, class U = T>
using micro_os_plus::utils::double_list_iterator< T, N, U >::iterator_pointer = N*

Type of reference to the iterator internal pointer.

Definition at line 388 of file lists.h.

◆ pointer

template<class T, class N = T, class U = T>
using micro_os_plus::utils::double_list_iterator< T, N, U >::pointer = value_type*

Type of pointer to object "pointed to" by the iterator.

Definition at line 378 of file lists.h.

◆ reference

template<class T, class N = T, class U = T>
using micro_os_plus::utils::double_list_iterator< T, N, U >::reference = value_type&

Type of reference to object "pointed to" by the iterator.

Definition at line 383 of file lists.h.

◆ value_type

template<class T, class N = T, class U = T>
using micro_os_plus::utils::double_list_iterator< T, N, U >::value_type = U

Type of value "pointed to" by the iterator.

Definition at line 373 of file lists.h.

Constructor & Destructor Documentation

◆ double_list_iterator() [1/3]

template<class T, class N, class U>
micro_os_plus::utils::double_list_iterator< T, N, U >::double_list_iterator ( )
constexpr

Definition at line 164 of file inlines.h.

◆ double_list_iterator() [2/3]

template<class T, class N, class U>
micro_os_plus::utils::double_list_iterator< T, N, U >::double_list_iterator ( iterator_pointer const node)
explicitconstexpr

Definition at line 169 of file inlines.h.

◆ double_list_iterator() [3/3]

template<class T, class N = T, class U = T>
micro_os_plus::utils::double_list_iterator< T, N, U >::double_list_iterator ( reference element)
explicitconstexpr

Member Function Documentation

◆ get_iterator_pointer()

template<class T, class N, class U>
double_list_iterator< T, N, U >::iterator_pointer micro_os_plus::utils::double_list_iterator< T, N, U >::get_iterator_pointer ( ) const
constexpr

Definition at line 252 of file inlines.h.

◆ get_pointer()

template<class T, class N = T, class U = T>
pointer micro_os_plus::utils::double_list_iterator< T, N, U >::get_pointer ( ) const
constexpr

◆ operator!=()

template<class T, class N, class U>
bool micro_os_plus::utils::double_list_iterator< T, N, U >::operator!= ( const double_list_iterator< T, N, U > & other) const
constexpr

Definition at line 244 of file inlines.h.

◆ operator*()

template<class T, class N, class U>
double_list_iterator< T, N, U >::reference micro_os_plus::utils::double_list_iterator< T, N, U >::operator* ( ) const
constexpr

Definition at line 195 of file inlines.h.

◆ operator++() [1/2]

template<class T, class N, class U>
double_list_iterator< T, N, U > & micro_os_plus::utils::double_list_iterator< T, N, U >::operator++ ( )
constexpr

Definition at line 202 of file inlines.h.

◆ operator++() [2/2]

template<class T, class N, class U>
double_list_iterator< T, N, U > micro_os_plus::utils::double_list_iterator< T, N, U >::operator++ ( int )
constexpr

Definition at line 210 of file inlines.h.

◆ operator--() [1/2]

template<class T, class N, class U>
double_list_iterator< T, N, U > & micro_os_plus::utils::double_list_iterator< T, N, U >::operator-- ( )
constexpr

Definition at line 219 of file inlines.h.

◆ operator--() [2/2]

template<class T, class N, class U>
double_list_iterator< T, N, U > micro_os_plus::utils::double_list_iterator< T, N, U >::operator-- ( int )
constexpr

Definition at line 227 of file inlines.h.

◆ operator->()

template<class T, class N, class U>
double_list_iterator< T, N, U >::pointer micro_os_plus::utils::double_list_iterator< T, N, U >::operator-> ( ) const
constexpr

Definition at line 188 of file inlines.h.

◆ operator==()

template<class T, class N, class U>
bool micro_os_plus::utils::double_list_iterator< T, N, U >::operator== ( const double_list_iterator< T, N, U > & other) const
constexpr

Definition at line 236 of file inlines.h.

Member Data Documentation

◆ node_

template<class T, class N = T, class U = T>
iterator_pointer micro_os_plus::utils::double_list_iterator< T, N, U >::node_
protected

Pointer to the node.

Definition at line 444 of file lists.h.


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