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

IntrusiveForwardListConstIterator class is a const iterator of elements on IntrusiveForwardList. More...

#include <IntrusiveForwardList.hpp>

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

Public Types

using difference_type = ptrdiff_t
 difference type More...
 
using iterator_category = std::forward_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 IntrusiveForwardListConstIterator ()
 IntrusiveForwardListConstIterator's constructor. More...
 
constexpr IntrusiveForwardListConstIterator (const IntrusiveForwardListNode *const node)
 IntrusiveForwardListConstIterator's constructor. More...
 
constexpr IntrusiveForwardListConstIterator (reference element)
 IntrusiveForwardListConstIterator's constructor. More...
 
template<IntrusiveForwardListNode T::* NonConstNodePointer>
constexpr IntrusiveForwardListConstIterator (const IntrusiveForwardListIterator< T, NonConstNodePointer, U > &iterator)
 IntrusiveForwardListConstIterator's constructor. More...
 
pointer operator-> () const
 IntrusiveForwardListConstIterator's binary infix pointer member access operator. More...
 
reference operator* () const
 IntrusiveForwardListConstIterator's unary prefix dereference operator. More...
 
IntrusiveForwardListConstIteratoroperator++ ()
 IntrusiveForwardListConstIterator's unary prefix increment operator. More...
 
IntrusiveForwardListConstIterator operator++ (int)
 IntrusiveForwardListConstIterator's unary postfix increment operator. More...
 
bool operator== (const IntrusiveForwardListConstIterator &other) const
 IntrusiveForwardListConstIterator's "equal to" comparison operator. More...
 

Private Member Functions

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

Private Attributes

const IntrusiveForwardListNodenode_
 pointer to const IntrusiveForwardListNode of the object "pointed to" by the iterator More...
 

Detailed Description

template<typename T, const IntrusiveForwardListNode T::* NodePointer, typename U = T>
class estd::IntrusiveForwardListConstIterator< T, NodePointer, U >

IntrusiveForwardListConstIterator class is a const iterator of elements on IntrusiveForwardList.

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

Template Parameters
Tis the type that has the IntrusiveForwardListNode variable
NodePointeris a const pointer-to-member to IntrusiveForwardListNode 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 IntrusiveForwardListNode T::* NodePointer, typename U = T>
using estd::IntrusiveForwardListConstIterator< T, NodePointer, U >::difference_type = ptrdiff_t

difference type

◆ iterator_category

template<typename T, const IntrusiveForwardListNode T::* NodePointer, typename U = T>
using estd::IntrusiveForwardListConstIterator< T, NodePointer, U >::iterator_category = std::forward_iterator_tag

category of the iterator

◆ pointer

template<typename T, const IntrusiveForwardListNode T::* NodePointer, typename U = T>
using estd::IntrusiveForwardListConstIterator< T, NodePointer, U >::pointer = const U*

pointer to object "pointed to" by the iterator

◆ reference

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

reference to object "pointed to" by the iterator

◆ value_type

template<typename T, const IntrusiveForwardListNode T::* NodePointer, typename U = T>
using estd::IntrusiveForwardListConstIterator< T, NodePointer, U >::value_type = U

value "pointed to" by the iterator

Constructor & Destructor Documentation

◆ IntrusiveForwardListConstIterator() [1/4]

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

◆ IntrusiveForwardListConstIterator() [2/4]

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

IntrusiveForwardListConstIterator's constructor.

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

◆ IntrusiveForwardListConstIterator() [3/4]

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

IntrusiveForwardListConstIterator's constructor.

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

◆ IntrusiveForwardListConstIterator() [4/4]

template<typename T, const IntrusiveForwardListNode T::* NodePointer, typename U = T>
template<IntrusiveForwardListNode T::* NonConstNodePointer>
constexpr estd::IntrusiveForwardListConstIterator< T, NodePointer, U >::IntrusiveForwardListConstIterator ( const IntrusiveForwardListIterator< T, NonConstNodePointer, U > &  iterator)
inline

IntrusiveForwardListConstIterator's constructor.

Converts non-const iterator (IntrusiveForwardListIterator) to const iterator (IntrusiveForwardListConstIterator).

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

Member Function Documentation

◆ getPointer()

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

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

Returns
pointer to object "pointed to" by the iterator

◆ operator*()

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

IntrusiveForwardListConstIterator's unary prefix dereference operator.

Returns
reference to object "pointed to" by the iterator

◆ operator++() [1/2]

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

IntrusiveForwardListConstIterator's unary prefix increment operator.

Returns
reference to "this" iterator

◆ operator++() [2/2]

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

IntrusiveForwardListConstIterator's unary postfix increment operator.

Returns
copy of "this" iterator before increment

◆ operator->()

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

IntrusiveForwardListConstIterator's binary infix pointer member access operator.

Returns
pointer to object "pointed to" by the iterator

◆ operator==()

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

IntrusiveForwardListConstIterator's "equal to" comparison operator.

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

Member Data Documentation

◆ node_

template<typename T, const IntrusiveForwardListNode T::* NodePointer, typename U = T>
const IntrusiveForwardListNode* estd::IntrusiveForwardListConstIterator< T, NodePointer, U >::node_
private

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


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