distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
estd::IntrusiveListConstIterator< T, NodePointer, U > Class Template Reference

IntrusiveListConstIterator class is a const iterator of elements on IntrusiveList. More...

#include <IntrusiveList.hpp>

Collaboration diagram for estd::IntrusiveListConstIterator< T, NodePointer, U >:
[legend]

Public Types

using difference_type = ptrdiff_t
 difference type More...
 
using iterator_category = std::bidirectional_iterator_tag
 category of the iterator More...
 
using pointer = const U *
 pointer to object "pointed to" by the iterator More...
 
using reference = const U &
 reference to object "pointed to" by the iterator More...
 
using value_type = U
 value "pointed to" by the iterator More...
 

Public Member Functions

constexpr IntrusiveListConstIterator ()
 IntrusiveListConstIterator's constructor. More...
 
constexpr IntrusiveListConstIterator (const IntrusiveListNode *const node)
 IntrusiveListConstIterator's constructor. More...
 
constexpr IntrusiveListConstIterator (reference element)
 IntrusiveListConstIterator's constructor. More...
 
template<IntrusiveListNode T::* NonConstNodePointer>
constexpr IntrusiveListConstIterator (const IntrusiveListIterator< T, NonConstNodePointer, U > &iterator)
 IntrusiveListConstIterator's constructor. More...
 
pointer operator-> () const
 IntrusiveListConstIterator's binary infix pointer member access operator. More...
 
reference operator* () const
 IntrusiveListConstIterator's unary prefix dereference operator. More...
 
IntrusiveListConstIteratoroperator++ ()
 IntrusiveListConstIterator's unary prefix increment operator. More...
 
IntrusiveListConstIterator operator++ (int)
 IntrusiveListConstIterator's unary postfix increment operator. More...
 
IntrusiveListConstIteratoroperator-- ()
 IntrusiveListConstIterator's unary prefix decrement operator. More...
 
IntrusiveListConstIterator operator-- (int)
 IntrusiveListConstIterator's unary postfix decrement operator. More...
 
bool operator== (const IntrusiveListConstIterator &other) const
 IntrusiveListConstIterator's "equal to" comparison operator. More...
 

Private Member Functions

pointer getPointer () const
 Converts contained pointer to IntrusiveListNode to pointer to object that contains this node. More...
 

Private Attributes

const IntrusiveListNodenode_
 pointer to const IntrusiveListNode of the object "pointed to" by the iterator More...
 

Detailed Description

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
class estd::IntrusiveListConstIterator< T, NodePointer, U >

IntrusiveListConstIterator class is a const iterator of elements on IntrusiveList.

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

Template Parameters
Tis the type that has the IntrusiveListNode variable
NodePointeris a const pointer-to-member to IntrusiveListNode variable in T
Uis the type that will be stored on the list; it can be different from T, but must be implicitly convertible to T (so usually a type derived from T); default - T;

Member Typedef Documentation

◆ difference_type

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
using estd::IntrusiveListConstIterator< T, NodePointer, U >::difference_type = ptrdiff_t

difference type

◆ iterator_category

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
using estd::IntrusiveListConstIterator< T, NodePointer, U >::iterator_category = std::bidirectional_iterator_tag

category of the iterator

◆ pointer

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
using estd::IntrusiveListConstIterator< T, NodePointer, U >::pointer = const U*

pointer to object "pointed to" by the iterator

◆ reference

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
using estd::IntrusiveListConstIterator< T, NodePointer, U >::reference = const U&

reference to object "pointed to" by the iterator

◆ value_type

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
using estd::IntrusiveListConstIterator< T, NodePointer, U >::value_type = U

value "pointed to" by the iterator

Constructor & Destructor Documentation

◆ IntrusiveListConstIterator() [1/4]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
constexpr estd::IntrusiveListConstIterator< T, NodePointer, U >::IntrusiveListConstIterator ( )
inline

◆ IntrusiveListConstIterator() [2/4]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
constexpr estd::IntrusiveListConstIterator< T, NodePointer, U >::IntrusiveListConstIterator ( const IntrusiveListNode *const  node)
inlineexplicit

IntrusiveListConstIterator's constructor.

Parameters
[in]nodeis a pointer to const IntrusiveListNode of element that will be "pointed to" by the iterator

◆ IntrusiveListConstIterator() [3/4]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
constexpr estd::IntrusiveListConstIterator< T, NodePointer, U >::IntrusiveListConstIterator ( reference  element)
inlineexplicit

IntrusiveListConstIterator's constructor.

Parameters
[in]elementis a const reference to element that will be "pointed to" by the iterator

◆ IntrusiveListConstIterator() [4/4]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
template<IntrusiveListNode T::* NonConstNodePointer>
constexpr estd::IntrusiveListConstIterator< T, NodePointer, U >::IntrusiveListConstIterator ( const IntrusiveListIterator< T, NonConstNodePointer, U > &  iterator)
inline

IntrusiveListConstIterator's constructor.

Converts non-const iterator (IntrusiveListIterator) to const iterator (IntrusiveListConstIterator).

Template Parameters
NonConstNodePointeris a non-const version of NodePointer
Parameters
[in]iteratoris a const reference to non-const iterator (IntrusiveListIterator)

Member Function Documentation

◆ getPointer()

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
pointer estd::IntrusiveListConstIterator< T, NodePointer, U >::getPointer ( ) const
inlineprivate

Converts contained pointer to IntrusiveListNode to pointer to object that contains this node.

Returns
pointer to object "pointed to" by the iterator

◆ operator*()

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
reference estd::IntrusiveListConstIterator< T, NodePointer, U >::operator* ( ) const
inline

IntrusiveListConstIterator's unary prefix dereference operator.

Returns
reference to object "pointed to" by the iterator

◆ operator++() [1/2]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
IntrusiveListConstIterator& estd::IntrusiveListConstIterator< T, NodePointer, U >::operator++ ( )
inline

IntrusiveListConstIterator's unary prefix increment operator.

Returns
reference to "this" iterator

◆ operator++() [2/2]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
IntrusiveListConstIterator estd::IntrusiveListConstIterator< T, NodePointer, U >::operator++ ( int  )
inline

IntrusiveListConstIterator's unary postfix increment operator.

Returns
copy of "this" iterator before increment

◆ operator--() [1/2]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
IntrusiveListConstIterator& estd::IntrusiveListConstIterator< T, NodePointer, U >::operator-- ( )
inline

IntrusiveListConstIterator's unary prefix decrement operator.

Returns
reference to "this" iterator

◆ operator--() [2/2]

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
IntrusiveListConstIterator estd::IntrusiveListConstIterator< T, NodePointer, U >::operator-- ( int  )
inline

IntrusiveListConstIterator's unary postfix decrement operator.

Returns
copy of "this" iterator before decrement

◆ operator->()

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
pointer estd::IntrusiveListConstIterator< T, NodePointer, U >::operator-> ( ) const
inline

IntrusiveListConstIterator's binary infix pointer member access operator.

Returns
pointer to object "pointed to" by the iterator

◆ operator==()

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
bool estd::IntrusiveListConstIterator< T, NodePointer, U >::operator== ( const IntrusiveListConstIterator< T, NodePointer, U > &  other) const
inline

IntrusiveListConstIterator's "equal to" comparison operator.

Parameters
[in]otheris a const reference to IntrusiveListConstIterator on right-hand side of comparison operator
Returns
true if both iterators are equal, false otherwise

Member Data Documentation

◆ node_

template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
const IntrusiveListNode* estd::IntrusiveListConstIterator< T, NodePointer, U >::node_
private

pointer to const IntrusiveListNode of the object "pointed to" by the iterator


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