µ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::intrusive_list_iterator< T, N, MP, U > Class Template Reference

Template for an intrusive 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 intrusive_list_iterator ()
 
constexpr intrusive_list_iterator (iterator_pointer const node)
 
constexpr intrusive_list_iterator (reference element)
 
Operators
pointer operator-> () const
 
reference operator* () const
 
intrusive_list_iteratoroperator++ ()
 
intrusive_list_iterator operator++ (int)
 
intrusive_list_iteratoroperator-- ()
 
intrusive_list_iterator operator-- (int)
 
bool operator== (const intrusive_list_iterator &other) const
 
bool operator!= (const intrusive_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, N T::* MP, typename U = T>
class os::utils::intrusive_list_iterator< T, N, MP, U >

Template for an intrusive list iterator.

Template Parameters
TType of object that includes the intrusive node.
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 552 of file lists.h.

Member Typedef Documentation

◆ difference_type

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

Type of pointer difference.

Definition at line 584 of file lists.h.

◆ iterator_category

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

Category of iterator.

Definition at line 589 of file lists.h.

◆ iterator_pointer

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

Type of reference to the iterator internal pointer.

Definition at line 579 of file lists.h.

◆ pointer

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

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

Definition at line 569 of file lists.h.

◆ reference

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

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

Definition at line 574 of file lists.h.

◆ value_type

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

Type of value "pointed to" by the iterator.

Definition at line 564 of file lists.h.

Constructor & Destructor Documentation

◆ intrusive_list_iterator() [1/3]

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

Definition at line 1050 of file lists.h.

◆ intrusive_list_iterator() [2/3]

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

Definition at line 1058 of file lists.h.

◆ intrusive_list_iterator() [3/3]

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

Definition at line 1067 of file lists.h.

Member Function Documentation

◆ get_iterator_pointer()

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

Definition at line 1158 of file lists.h.

◆ get_pointer()

template<typename T , typename N , N T::* MP, typename U >
intrusive_list_iterator< T, N, MP, U >::pointer os::utils::intrusive_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 1141 of file lists.h.

◆ operator!=()

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

Definition at line 1133 of file lists.h.

◆ operator*()

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

Definition at line 1084 of file lists.h.

◆ operator++() [1/2]

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

Definition at line 1091 of file lists.h.

◆ operator++() [2/2]

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

Definition at line 1099 of file lists.h.

◆ operator--() [1/2]

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

Definition at line 1108 of file lists.h.

◆ operator--() [2/2]

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

Definition at line 1116 of file lists.h.

◆ operator->()

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

Definition at line 1077 of file lists.h.

◆ operator==()

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

Definition at line 1125 of file lists.h.

Member Data Documentation

◆ node_

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

Pointer to intrusive node.

Definition at line 676 of file lists.h.


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