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

Intrusive stack constant iterator. More...

#include <stack.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

 StackConstIterator () noexcept
 
 StackConstIterator (const T *node) noexcept
 
 StackConstIterator (const StackIterator< T > &it) noexcept
 
 StackConstIterator (const StackConstIterator &it) noexcept=default
 
 StackConstIterator (StackConstIterator &&it) noexcept=default
 
 ~StackConstIterator () noexcept=default
 
StackConstIteratoroperator= (const StackIterator< T > &it) noexcept
 
StackConstIteratoroperator= (const StackConstIterator &it) noexcept=default
 
StackConstIteratoroperator= (StackConstIterator &&it) noexcept=default
 
StackConstIteratoroperator++ () noexcept
 
StackConstIterator operator++ (int) noexcept
 
const_reference operator* () const noexcept
 
const_pointer operator-> () const noexcept
 
 operator bool () const noexcept
 Check if the iterator is valid. More...
 
void swap (StackConstIterator &it) noexcept
 Swap two instances. More...
 

Friends

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

Detailed Description

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

Intrusive stack constant iterator.

Not thread-safe.

Definition at line 244 of file stack.h.

Member Typedef Documentation

◆ const_pointer

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

Definition at line 252 of file stack.h.

◆ const_reference

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

Definition at line 250 of file stack.h.

◆ difference_type

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

Definition at line 253 of file stack.h.

◆ iterator_category

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

Definition at line 255 of file stack.h.

◆ pointer

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

Definition at line 251 of file stack.h.

◆ reference

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

Definition at line 249 of file stack.h.

◆ size_type

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

Definition at line 254 of file stack.h.

◆ value_type

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

Definition at line 248 of file stack.h.

Constructor & Destructor Documentation

◆ StackConstIterator() [1/5]

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

Definition at line 257 of file stack.h.

◆ StackConstIterator() [2/5]

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

Definition at line 258 of file stack.h.

◆ StackConstIterator() [3/5]

template<typename T >
CppCommon::StackConstIterator< T >::StackConstIterator ( const StackIterator< T > &  it)
inlinenoexcept

Definition at line 259 of file stack.h.

◆ StackConstIterator() [4/5]

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

◆ StackConstIterator() [5/5]

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

◆ ~StackConstIterator()

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

Member Function Documentation

◆ operator bool()

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

Check if the iterator is valid.

Definition at line 281 of file stack.h.

◆ operator*()

template<typename T >
StackConstIterator< T >::const_reference CppCommon::StackConstIterator< T >::operator*
noexcept

Definition at line 174 of file stack.inl.

◆ operator++() [1/2]

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

Definition at line 158 of file stack.inl.

◆ operator++() [2/2]

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

Definition at line 166 of file stack.inl.

◆ operator->()

template<typename T >
StackConstIterator< T >::const_pointer CppCommon::StackConstIterator< T >::operator->
noexcept

Definition at line 182 of file stack.inl.

◆ operator=() [1/3]

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

◆ operator=() [2/3]

template<typename T >
StackConstIterator& CppCommon::StackConstIterator< T >::operator= ( const StackIterator< T > &  it)
inlinenoexcept

Definition at line 264 of file stack.h.

◆ operator=() [3/3]

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

◆ swap()

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

Swap two instances.

Definition at line 188 of file stack.inl.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 271 of file stack.h.

◆ operator==

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

Definition at line 269 of file stack.h.

◆ swap

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

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