CppCommon  1.0.4.1
C++ Common Library
Public Types | Public Member Functions | Friends | List of all members
CppCommon::QueueIterator< T > Class Template Reference

Intrusive queue iterator. More...

#include <queue.h>

Public Types

typedef T value_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef ptrdiff_t difference_type
 
typedef size_t size_type
 
typedef std::forward_iterator_tag iterator_category
 

Public Member Functions

 QueueIterator () noexcept
 
 QueueIterator (T *node) noexcept
 
 QueueIterator (const QueueIterator &it) noexcept=default
 
 QueueIterator (QueueIterator &&it) noexcept=default
 
 ~QueueIterator () noexcept=default
 
QueueIteratoroperator= (const QueueIterator &it) noexcept=default
 
QueueIteratoroperator= (QueueIterator &&it) noexcept=default
 
QueueIteratoroperator++ () noexcept
 
QueueIterator operator++ (int) noexcept
 
reference operator* () noexcept
 
pointer operator-> () noexcept
 
 operator bool () const noexcept
 Check if the iterator is valid. More...
 
void swap (QueueIterator &it) noexcept
 Swap two instances. More...
 

Friends

bool operator== (const QueueIterator &it1, const QueueIterator &it2) noexcept
 
bool operator!= (const QueueIterator &it1, const QueueIterator &it2) noexcept
 
template<typename U >
void swap (QueueIterator< U > &it1, QueueIterator< U > &it2) noexcept
 

Detailed Description

template<typename T>
class CppCommon::QueueIterator< T >

Intrusive queue iterator.

Not thread-safe.

Definition at line 194 of file queue.h.

Member Typedef Documentation

◆ const_pointer

template<typename T >
typedef const value_type* CppCommon::QueueIterator< T >::const_pointer

Definition at line 204 of file queue.h.

◆ const_reference

template<typename T >
typedef const value_type& CppCommon::QueueIterator< T >::const_reference

Definition at line 202 of file queue.h.

◆ difference_type

template<typename T >
typedef ptrdiff_t CppCommon::QueueIterator< T >::difference_type

Definition at line 205 of file queue.h.

◆ iterator_category

template<typename T >
typedef std::forward_iterator_tag CppCommon::QueueIterator< T >::iterator_category

Definition at line 207 of file queue.h.

◆ pointer

template<typename T >
typedef value_type* CppCommon::QueueIterator< T >::pointer

Definition at line 203 of file queue.h.

◆ reference

template<typename T >
typedef value_type& CppCommon::QueueIterator< T >::reference

Definition at line 201 of file queue.h.

◆ size_type

template<typename T >
typedef size_t CppCommon::QueueIterator< T >::size_type

Definition at line 206 of file queue.h.

◆ value_type

template<typename T >
typedef T CppCommon::QueueIterator< T >::value_type

Definition at line 200 of file queue.h.

Constructor & Destructor Documentation

◆ QueueIterator() [1/4]

template<typename T >
CppCommon::QueueIterator< T >::QueueIterator ( )
inlinenoexcept

Definition at line 209 of file queue.h.

◆ QueueIterator() [2/4]

template<typename T >
CppCommon::QueueIterator< T >::QueueIterator ( T *  node)
inlineexplicitnoexcept

Definition at line 210 of file queue.h.

◆ QueueIterator() [3/4]

template<typename T >
CppCommon::QueueIterator< T >::QueueIterator ( const QueueIterator< T > &  it)
defaultnoexcept

◆ QueueIterator() [4/4]

template<typename T >
CppCommon::QueueIterator< T >::QueueIterator ( QueueIterator< T > &&  it)
defaultnoexcept

◆ ~QueueIterator()

template<typename T >
CppCommon::QueueIterator< T >::~QueueIterator ( )
defaultnoexcept

Member Function Documentation

◆ operator bool()

template<typename T >
CppCommon::QueueIterator< T >::operator bool ( ) const
inlineexplicitnoexcept

Check if the iterator is valid.

Definition at line 230 of file queue.h.

◆ operator*()

template<typename T >
QueueIterator< T >::reference CppCommon::QueueIterator< T >::operator*
noexcept

Definition at line 140 of file queue.inl.

◆ operator++() [1/2]

template<typename T >
QueueIterator< T > & CppCommon::QueueIterator< T >::operator++
noexcept

Definition at line 124 of file queue.inl.

◆ operator++() [2/2]

template<typename T >
QueueIterator< T > CppCommon::QueueIterator< T >::operator++ ( int  )
inlinenoexcept

Definition at line 132 of file queue.inl.

◆ operator->()

template<typename T >
QueueIterator< T >::pointer CppCommon::QueueIterator< T >::operator->
noexcept

Definition at line 148 of file queue.inl.

◆ operator=() [1/2]

template<typename T >
QueueIterator& CppCommon::QueueIterator< T >::operator= ( const QueueIterator< T > &  it)
defaultnoexcept

◆ operator=() [2/2]

template<typename T >
QueueIterator& CppCommon::QueueIterator< T >::operator= ( QueueIterator< T > &&  it)
defaultnoexcept

◆ swap()

template<typename T >
void CppCommon::QueueIterator< T >::swap ( QueueIterator< T > &  it)
noexcept

Swap two instances.

Definition at line 154 of file queue.inl.

Friends And Related Function Documentation

◆ operator!=

template<typename T >
bool operator!= ( const QueueIterator< T > &  it1,
const QueueIterator< T > &  it2 
)
friend

Definition at line 220 of file queue.h.

◆ operator==

template<typename T >
bool operator== ( const QueueIterator< T > &  it1,
const QueueIterator< T > &  it2 
)
friend

Definition at line 218 of file queue.h.

◆ swap

template<typename T >
template<typename U >
void swap ( QueueIterator< U > &  it1,
QueueIterator< U > &  it2 
)
friend

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