µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::utils::double_list_iterator< T, N, MP, U > Class Template Reference

Template for a double linked list iterator. More...

#include <cmsis-plus/utils/lists.h>

Public Types

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

Public Member Functions

Constructors & Destructor
constexpr double_list_iterator ()
 
constexpr double_list_iterator (iterator_pointer const node)
 
constexpr double_list_iterator (reference element)
 
Operators
pointer operator-> () const
 
reference operator* () const
 
double_list_iteratoroperator++ ()
 
double_list_iterator operator++ (int)
 
double_list_iteratoroperator-- ()
 
double_list_iterator operator-- (int)
 
bool operator== (const double_list_iterator &other) const
 
bool operator!= (const double_list_iterator &other) const
 
Public Member Functions
pointer get_pointer (void) const
 Get the object node from the intrusive node.
 
iterator_pointer get_iterator_pointer () const
 

Protected Attributes

Private Member Variables
iterator_pointer node_
 Pointer to intrusive node.
 

Detailed Description

template<typename T, typename N, T *N::* MP, typename U = T>
class os::utils::double_list_iterator< T, N, MP, U >

Template for a double linked list iterator.

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

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

Definition at line 210 of file lists.h.

Member Typedef Documentation

◆ difference_type

template<typename T , typename N , T *N::* MP, typename U = T>
using os::utils::double_list_iterator< T, N, MP, U >::difference_type = ptrdiff_t

Type of pointer difference.

Definition at line 242 of file lists.h.

◆ iterator_category

template<typename T , typename N , T *N::* MP, typename U = T>
using os::utils::double_list_iterator< T, N, MP, U >::iterator_category = std::forward_iterator_tag

Category of iterator.

Definition at line 247 of file lists.h.

◆ iterator_pointer

template<typename T , typename N , T *N::* MP, typename U = T>
using os::utils::double_list_iterator< T, N, MP, U >::iterator_pointer = N*

Type of reference to the iterator internal pointer.

Definition at line 237 of file lists.h.

◆ pointer

template<typename T , typename N , T *N::* MP, typename U = T>
using os::utils::double_list_iterator< T, N, MP, U >::pointer = U*

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

Definition at line 227 of file lists.h.

◆ reference

template<typename T , typename N , T *N::* MP, typename U = T>
using os::utils::double_list_iterator< T, N, MP, U >::reference = U&

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

Definition at line 232 of file lists.h.

◆ value_type

template<typename T , typename N , T *N::* MP, typename U = T>
using os::utils::double_list_iterator< T, N, MP, U >::value_type = U

Type of value "pointed to" by the iterator.

Definition at line 222 of file lists.h.

Constructor & Destructor Documentation

◆ double_list_iterator() [1/3]

template<typename T , typename N , T *N::* MP, typename U >
constexpr os::utils::double_list_iterator< T, N, MP, U >::double_list_iterator
constexpr

Definition at line 893 of file lists.h.

◆ double_list_iterator() [2/3]

template<typename T , typename N , T *N::* MP, typename U >
constexpr os::utils::double_list_iterator< T, N, MP, U >::double_list_iterator ( iterator_pointer const  node)
explicitconstexpr

Definition at line 901 of file lists.h.

◆ double_list_iterator() [3/3]

template<typename T , typename N , T *N::* MP, typename U >
constexpr os::utils::double_list_iterator< T, N, MP, U >::double_list_iterator ( reference  element)
explicitconstexpr

Definition at line 910 of file lists.h.

Member Function Documentation

◆ get_iterator_pointer()

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U >::iterator_pointer os::utils::double_list_iterator< T, N, MP, U >::get_iterator_pointer
inline

Definition at line 992 of file lists.h.

◆ get_pointer()

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U >::pointer os::utils::double_list_iterator< T, N, MP, U >::get_pointer ( void  ) const
inline

Get the object node from the intrusive node.

Returns
Pointer to object node.

Definition at line 985 of file lists.h.

◆ operator!=()

template<typename T , typename N , T *N::* MP, typename U >
bool os::utils::double_list_iterator< T, N, MP, U >::operator!= ( const double_list_iterator< T, N, MP, U > &  other) const
inline

Definition at line 976 of file lists.h.

◆ operator*()

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U >::reference os::utils::double_list_iterator< T, N, MP, U >::operator*
inline

Definition at line 927 of file lists.h.

◆ operator++() [1/2]

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U > & os::utils::double_list_iterator< T, N, MP, U >::operator++
inline

Definition at line 934 of file lists.h.

◆ operator++() [2/2]

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U > os::utils::double_list_iterator< T, N, MP, U >::operator++ ( int  )
inline

Definition at line 942 of file lists.h.

◆ operator--() [1/2]

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U > & os::utils::double_list_iterator< T, N, MP, U >::operator--
inline

Definition at line 951 of file lists.h.

◆ operator--() [2/2]

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U > os::utils::double_list_iterator< T, N, MP, U >::operator-- ( int  )

Definition at line 959 of file lists.h.

◆ operator->()

template<typename T , typename N , T *N::* MP, typename U >
double_list_iterator< T, N, MP, U >::pointer os::utils::double_list_iterator< T, N, MP, U >::operator->
inline

Definition at line 920 of file lists.h.

◆ operator==()

template<typename T , typename N , T *N::* MP, typename U >
bool os::utils::double_list_iterator< T, N, MP, U >::operator== ( const double_list_iterator< T, N, MP, U > &  other) const
inline

Definition at line 968 of file lists.h.

Member Data Documentation

◆ node_

template<typename T , typename N , T *N::* MP, typename U = T>
iterator_pointer os::utils::double_list_iterator< T, N, MP, U >::node_
protected

Pointer to intrusive node.

Definition at line 334 of file lists.h.


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