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

Intrusive binary tree constant iterator. More...

#include <bintree.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::bidirectional_iterator_tag iterator_category
 

Public Member Functions

 BinTreeConstIterator () noexcept
 
 BinTreeConstIterator (const TContainer *container, const T *node) noexcept
 
 BinTreeConstIterator (const BinTreeIterator< TContainer, T > &it) noexcept
 
 BinTreeConstIterator (const BinTreeConstIterator &it) noexcept=default
 
 BinTreeConstIterator (BinTreeConstIterator &&it) noexcept=default
 
 ~BinTreeConstIterator () noexcept=default
 
BinTreeConstIteratoroperator= (const BinTreeIterator< TContainer, T > &it) noexcept
 
BinTreeConstIteratoroperator= (const BinTreeConstIterator &it) noexcept=default
 
BinTreeConstIteratoroperator= (BinTreeConstIterator &&it) noexcept=default
 
BinTreeConstIteratoroperator++ () noexcept
 
BinTreeConstIterator operator++ (int) noexcept
 
const_reference operator* () const noexcept
 
const_pointer operator-> () const noexcept
 
 operator bool () const noexcept
 Check if the iterator is valid. More...
 
bool compare (const T &item1, const T &item2) const noexcept
 Compare two items: if the first item is less than the second one? More...
 
void swap (BinTreeConstIterator &it) noexcept
 Swap two instances. More...
 

Friends

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

Detailed Description

template<class TContainer, typename T>
class CppCommon::BinTreeConstIterator< TContainer, T >

Intrusive binary tree constant iterator.

Not thread-safe.

Definition at line 334 of file bintree.h.

Member Typedef Documentation

◆ const_pointer

template<class TContainer , typename T >
typedef const value_type* CppCommon::BinTreeConstIterator< TContainer, T >::const_pointer

Definition at line 342 of file bintree.h.

◆ const_reference

template<class TContainer , typename T >
typedef const value_type& CppCommon::BinTreeConstIterator< TContainer, T >::const_reference

Definition at line 340 of file bintree.h.

◆ difference_type

template<class TContainer , typename T >
typedef ptrdiff_t CppCommon::BinTreeConstIterator< TContainer, T >::difference_type

Definition at line 343 of file bintree.h.

◆ iterator_category

template<class TContainer , typename T >
typedef std::bidirectional_iterator_tag CppCommon::BinTreeConstIterator< TContainer, T >::iterator_category

Definition at line 345 of file bintree.h.

◆ pointer

template<class TContainer , typename T >
typedef value_type* CppCommon::BinTreeConstIterator< TContainer, T >::pointer

Definition at line 341 of file bintree.h.

◆ reference

template<class TContainer , typename T >
typedef value_type& CppCommon::BinTreeConstIterator< TContainer, T >::reference

Definition at line 339 of file bintree.h.

◆ size_type

template<class TContainer , typename T >
typedef size_t CppCommon::BinTreeConstIterator< TContainer, T >::size_type

Definition at line 344 of file bintree.h.

◆ value_type

template<class TContainer , typename T >
typedef T CppCommon::BinTreeConstIterator< TContainer, T >::value_type

Definition at line 338 of file bintree.h.

Constructor & Destructor Documentation

◆ BinTreeConstIterator() [1/5]

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::BinTreeConstIterator ( )
inlinenoexcept

Definition at line 347 of file bintree.h.

◆ BinTreeConstIterator() [2/5]

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::BinTreeConstIterator ( const TContainer *  container,
const T *  node 
)
inlineexplicitnoexcept

Definition at line 348 of file bintree.h.

◆ BinTreeConstIterator() [3/5]

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::BinTreeConstIterator ( const BinTreeIterator< TContainer, T > &  it)
inlinenoexcept

Definition at line 349 of file bintree.h.

◆ BinTreeConstIterator() [4/5]

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::BinTreeConstIterator ( const BinTreeConstIterator< TContainer, T > &  it)
defaultnoexcept

◆ BinTreeConstIterator() [5/5]

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::BinTreeConstIterator ( BinTreeConstIterator< TContainer, T > &&  it)
defaultnoexcept

◆ ~BinTreeConstIterator()

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::~BinTreeConstIterator ( )
defaultnoexcept

Member Function Documentation

◆ compare()

template<class TContainer , typename T >
bool CppCommon::BinTreeConstIterator< TContainer, T >::compare ( const T &  item1,
const T &  item2 
) const
inlinenoexcept

Compare two items: if the first item is less than the second one?

Definition at line 374 of file bintree.h.

◆ operator bool()

template<class TContainer , typename T >
CppCommon::BinTreeConstIterator< TContainer, T >::operator bool ( ) const
inlineexplicitnoexcept

Check if the iterator is valid.

Definition at line 371 of file bintree.h.

◆ operator*()

template<class TContainer , typename T >
BinTreeConstIterator< TContainer, T >::const_reference CppCommon::BinTreeConstIterator< TContainer, T >::operator*
noexcept

Definition at line 507 of file bintree.inl.

◆ operator++() [1/2]

template<class TContainer , typename T >
BinTreeConstIterator< TContainer, T > & CppCommon::BinTreeConstIterator< TContainer, T >::operator++
noexcept

Definition at line 478 of file bintree.inl.

◆ operator++() [2/2]

template<class TContainer , typename T >
BinTreeConstIterator< TContainer, T > CppCommon::BinTreeConstIterator< TContainer, T >::operator++ ( int  )
inlinenoexcept

Definition at line 499 of file bintree.inl.

◆ operator->()

template<class TContainer , typename T >
BinTreeConstIterator< TContainer, T >::const_pointer CppCommon::BinTreeConstIterator< TContainer, T >::operator->
noexcept

Definition at line 515 of file bintree.inl.

◆ operator=() [1/3]

template<class TContainer , typename T >
BinTreeConstIterator& CppCommon::BinTreeConstIterator< TContainer, T >::operator= ( BinTreeConstIterator< TContainer, T > &&  it)
defaultnoexcept

◆ operator=() [2/3]

template<class TContainer , typename T >
BinTreeConstIterator& CppCommon::BinTreeConstIterator< TContainer, T >::operator= ( const BinTreeConstIterator< TContainer, T > &  it)
defaultnoexcept

◆ operator=() [3/3]

template<class TContainer , typename T >
BinTreeConstIterator& CppCommon::BinTreeConstIterator< TContainer, T >::operator= ( const BinTreeIterator< TContainer, T > &  it)
inlinenoexcept

Definition at line 354 of file bintree.h.

◆ swap()

template<class TContainer , typename T >
void CppCommon::BinTreeConstIterator< TContainer, T >::swap ( BinTreeConstIterator< TContainer, T > &  it)
noexcept

Swap two instances.

Definition at line 521 of file bintree.inl.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 361 of file bintree.h.

◆ operator==

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

Definition at line 359 of file bintree.h.

◆ swap

template<class TContainer , typename T >
template<class UContainer , typename U >
void swap ( BinTreeConstIterator< UContainer, U > &  it1,
BinTreeConstIterator< UContainer, U > &  it2 
)
friend

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