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

IntrusiveForwardListIterator class is an iterator of elements on IntrusiveForwardList. More...

#include <IntrusiveForwardList.hpp>

Collaboration diagram for estd::IntrusiveForwardListIterator< 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 = U *
 pointer to object "pointed to" by the iterator More...
 
using reference = 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 IntrusiveForwardListIterator ()
 IntrusiveForwardListIterator's constructor. More...
 
constexpr IntrusiveForwardListIterator (IntrusiveForwardListNode *const node)
 IntrusiveForwardListIterator's constructor. More...
 
constexpr IntrusiveForwardListIterator (reference element)
 IntrusiveForwardListIterator's constructor. More...
 
pointer operator-> () const
 IntrusiveForwardListIterator's binary infix pointer member access operator. More...
 
reference operator* () const
 IntrusiveForwardListIterator's unary prefix dereference operator. More...
 
IntrusiveForwardListIteratoroperator++ ()
 IntrusiveForwardListIterator's unary prefix increment operator. More...
 
IntrusiveForwardListIterator operator++ (int)
 IntrusiveForwardListIterator's unary postfix increment operator. More...
 
bool operator== (const IntrusiveForwardListIterator &other) const
 IntrusiveForwardListIterator'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

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

Detailed Description

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

IntrusiveForwardListIterator class is an iterator of elements on IntrusiveForwardList.

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

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

difference type

◆ iterator_category

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

category of the iterator

◆ pointer

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

pointer to object "pointed to" by the iterator

◆ reference

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

reference to object "pointed to" by the iterator

◆ value_type

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

value "pointed to" by the iterator

Constructor & Destructor Documentation

◆ IntrusiveForwardListIterator() [1/3]

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

◆ IntrusiveForwardListIterator() [2/3]

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

IntrusiveForwardListIterator's constructor.

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

◆ IntrusiveForwardListIterator() [3/3]

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

IntrusiveForwardListIterator's constructor.

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

Member Function Documentation

◆ getPointer()

template<typename T, IntrusiveForwardListNode T::* NodePointer, typename U = T>
pointer estd::IntrusiveForwardListIterator< 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, IntrusiveForwardListNode T::* NodePointer, typename U = T>
reference estd::IntrusiveForwardListIterator< T, NodePointer, U >::operator* ( ) const
inline

IntrusiveForwardListIterator's unary prefix dereference operator.

Returns
reference to object "pointed to" by the iterator

◆ operator++() [1/2]

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

IntrusiveForwardListIterator's unary prefix increment operator.

Returns
reference to "this" iterator

◆ operator++() [2/2]

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

IntrusiveForwardListIterator's unary postfix increment operator.

Returns
copy of "this" iterator before increment

◆ operator->()

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

IntrusiveForwardListIterator's binary infix pointer member access operator.

Returns
pointer to object "pointed to" by the iterator

◆ operator==()

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

IntrusiveForwardListIterator's "equal to" comparison operator.

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

Member Data Documentation

◆ node_

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

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


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