StanfordCPPLib
Public Types | Public Member Functions | List of all members
CheckedIterator< Iterator > Class Template Reference

#include "collections.h"

Public Types

using difference_type = typename std::iterator_traits< Iterator >::difference_type
 
using iterator_category = typename std::iterator_traits< Iterator >::iterator_category
 
using pointer = typename std::iterator_traits< Iterator >::pointer
 
using reference = typename std::iterator_traits< Iterator >::reference
 
using value_type = typename std::iterator_traits< Iterator >::value_type
 

Public Member Functions

 CheckedIterator()=default
 
template<typename Container >
 CheckedIterator(const VersionTracker *owner, Iterator iter, Container &c)
 
template<typename OtherItr >
 CheckedIterator(const CheckedIterator< OtherItr > &rhs)
 
template<typename OtherItr >
 operator CheckedIterator< OtherItr >() const
 
template<typename OtherItr >
bool operator!=(const CheckedIterator< OtherItr > &rhs) const
 
reference operator*() const
 
CheckedIterator operator+(difference_type index) const
 
CheckedIteratoroperator++()
 
CheckedIterator operator++(int)
 
CheckedIteratoroperator+=(difference_type index)
 
CheckedIterator operator-(difference_type index) const
 
template<typename OtherItr >
difference_type operator-(const CheckedIterator< OtherItr > &rhs) const
 
CheckedIteratoroperator--()
 
CheckedIterator operator--(int)
 
CheckedIteratoroperator-=(difference_type index)
 
pointer operator->() const
 
template<typename OtherItr >
bool operator<(const CheckedIterator< OtherItr > &rhs) const
 
template<typename OtherItr >
bool operator<=(const CheckedIterator< OtherItr > &rhs) const
 
template<typename OtherItr >
bool operator==(const CheckedIterator< OtherItr > &rhs) const
 
template<typename OtherItr >
bool operator>(const CheckedIterator< OtherItr > &rhs) const
 
template<typename OtherItr >
bool operator>=(const CheckedIterator< OtherItr > &rhs) const
 
reference operator[](difference_type index) const
 
unsigned int version() const
 

Member Typedef Documentation

◆ difference_type

using difference_type = typename std::iterator_traits<Iterator>::difference_type

◆ iterator_category

using iterator_category = typename std::iterator_traits<Iterator>::iterator_category

◆ pointer

using pointer = typename std::iterator_traits<Iterator>::pointer

◆ reference

using reference = typename std::iterator_traits<Iterator>::reference

◆ value_type

using value_type = typename std::iterator_traits<Iterator>::value_type

Constructor & Destructor Documentation

◆ CheckedIterator() [1/3]

CheckedIterator ( )
default

◆ CheckedIterator() [2/3]

CheckedIterator ( const VersionTracker owner,
Iterator  iter,
Container &  c 
)
inline

◆ CheckedIterator() [3/3]

CheckedIterator ( const CheckedIterator< OtherItr > &  rhs)
inline

Member Function Documentation

◆ operator CheckedIterator< OtherItr >()

operator CheckedIterator< OtherItr > ( ) const
inline

◆ operator!=()

bool operator!= ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator*()

reference operator* ( ) const
inline

◆ operator+()

CheckedIterator operator+ ( difference_type  index) const
inline

◆ operator++() [1/2]

CheckedIterator& operator++ ( )
inline

◆ operator++() [2/2]

CheckedIterator operator++ ( int  )
inline

◆ operator+=()

CheckedIterator& operator+= ( difference_type  index)
inline

◆ operator-() [1/2]

CheckedIterator operator- ( difference_type  index) const
inline

◆ operator-() [2/2]

difference_type operator- ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator--() [1/2]

CheckedIterator& operator-- ( )
inline

◆ operator--() [2/2]

CheckedIterator operator-- ( int  )
inline

◆ operator-=()

CheckedIterator& operator-= ( difference_type  index)
inline

◆ operator->()

pointer operator-> ( ) const
inline

◆ operator<()

bool operator< ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator<=()

bool operator<= ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator==()

bool operator== ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator>()

bool operator> ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator>=()

bool operator>= ( const CheckedIterator< OtherItr > &  rhs) const
inline

◆ operator[]()

reference operator[] ( difference_type  index) const
inline

◆ version()

unsigned int version ( ) const
inline

Friends And Related Function Documentation

◆ CheckedIterator

friend class CheckedIterator
friend