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_iterator & | operator++ () |
intrusive_list_iterator | operator++ (int) |
intrusive_list_iterator & | operator-- () |
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. | |
Template for an intrusive list iterator.
T | Type of object that includes the intrusive node. |
N | Type of intrusive node. Must have the public members prev & next. |
MP | Name of the intrusive node member in object T. |
U | Type stored in the list, derived from T. |
This class provides an interface similar to std::list::iterator.
using os::utils::intrusive_list_iterator< T, N, MP, U >::difference_type = ptrdiff_t |
using os::utils::intrusive_list_iterator< T, N, MP, U >::iterator_category = std::forward_iterator_tag |
using os::utils::intrusive_list_iterator< T, N, MP, U >::iterator_pointer = N* |
using os::utils::intrusive_list_iterator< T, N, MP, U >::pointer = U* |
using os::utils::intrusive_list_iterator< T, N, MP, U >::reference = U& |
using os::utils::intrusive_list_iterator< T, N, MP, U >::value_type = U |
|
constexpr |
|
explicitconstexpr |
|
explicitconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
intrusive_list_iterator< T, N, MP, U > os::utils::intrusive_list_iterator< T, N, MP, U >::operator-- | ( | int | ) |
|
inline |
|
inline |
|
protected |