HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tf_ProxyReferenceReverseIterator< UnderlyingIterator > Class Template Reference

#include <iterator.h>

+ Inheritance diagram for Tf_ProxyReferenceReverseIterator< UnderlyingIterator >:

Public Types

using iterator_type = typename ReverseIterator::iterator_type
 
using iterator_category = typename ReverseIterator::iterator_category
 
using value_type = typename ReverseIterator::value_type
 
using reference = typename ReverseIterator::reference
 
using pointer = typename ReverseIterator::pointer
 
using difference_type = typename ReverseIterator::difference_type
 

Public Member Functions

 Tf_ProxyReferenceReverseIterator ()=default
 
 Tf_ProxyReferenceReverseIterator (UnderlyingIterator it)
 
pointer operator-> () const
 
Tf_ProxyReferenceReverseIteratoroperator++ ()
 
Tf_ProxyReferenceReverseIterator operator++ (int)
 
Tf_ProxyReferenceReverseIteratoroperator-- ()
 
Tf_ProxyReferenceReverseIterator operator-- (int)
 
Tf_ProxyReferenceReverseIterator operator+ (difference_type increment) const
 
Tf_ProxyReferenceReverseIterator operator- (difference_type decrement) const
 
template<typename OtherIt >
difference_type operator- (const Tf_ProxyReferenceReverseIterator< OtherIt > &other) const
 
Tf_ProxyReferenceReverseIteratoroperator+= (difference_type increment)
 
Tf_ProxyReferenceReverseIteratoroperator-= (difference_type decrement)
 

Friends

Tf_ProxyReferenceReverseIterator operator+ (const difference_type increment, const Tf_ProxyReferenceReverseIterator &iterator)
 
template<typename OtherIt >
bool operator== (const Tf_ProxyReferenceReverseIterator &lhs, const Tf_ProxyReferenceReverseIterator< OtherIt > &rhs)
 
template<typename OtherIt >
bool operator!= (const Tf_ProxyReferenceReverseIterator &lhs, const Tf_ProxyReferenceReverseIterator< OtherIt > &rhs)
 
template<typename OtherIt >
bool operator< (const Tf_ProxyReferenceReverseIterator &lhs, const Tf_ProxyReferenceReverseIterator< OtherIt > &rhs)
 
template<typename OtherIt >
bool operator> (const Tf_ProxyReferenceReverseIterator &lhs, const Tf_ProxyReferenceReverseIterator< OtherIt > &rhs)
 
template<typename OtherIt >
bool operator<= (const Tf_ProxyReferenceReverseIterator &lhs, const Tf_ProxyReferenceReverseIterator< OtherIt > &rhs)
 
template<typename OtherIt >
bool operator>= (const Tf_ProxyReferenceReverseIterator &lhs, const Tf_ProxyReferenceReverseIterator< OtherIt > &rhs)
 

Detailed Description

template<typename UnderlyingIterator>
class Tf_ProxyReferenceReverseIterator< UnderlyingIterator >

A reverse iterator adapter for std::reverse_iterator that provides an operator-> compatible with proxy reference types. This should only be used when the underlying iterator's reference is a value type and should become unnecessary in newer compilers and C++20. This implementation was written for use with random access iterators but could be extended to bidirectional iterators if necessary.

Definition at line 419 of file iterator.h.

Member Typedef Documentation

template<typename UnderlyingIterator>
using Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::difference_type = typename ReverseIterator::difference_type

Definition at line 436 of file iterator.h.

template<typename UnderlyingIterator>
using Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::iterator_category = typename ReverseIterator::iterator_category

Definition at line 432 of file iterator.h.

template<typename UnderlyingIterator>
using Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::iterator_type = typename ReverseIterator::iterator_type

Definition at line 431 of file iterator.h.

template<typename UnderlyingIterator>
using Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::pointer = typename ReverseIterator::pointer

Definition at line 435 of file iterator.h.

template<typename UnderlyingIterator>
using Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::reference = typename ReverseIterator::reference

Definition at line 434 of file iterator.h.

template<typename UnderlyingIterator>
using Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::value_type = typename ReverseIterator::value_type

Definition at line 433 of file iterator.h.

Constructor & Destructor Documentation

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::Tf_ProxyReferenceReverseIterator ( )
default
template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::Tf_ProxyReferenceReverseIterator ( UnderlyingIterator  it)
inlineexplicit

Definition at line 449 of file iterator.h.

Member Function Documentation

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator+ ( difference_type  increment) const
inline

Definition at line 487 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator& Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator++ ( )
inline

Definition at line 465 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator++ ( int  )
inline

Definition at line 470 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator& Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator+= ( difference_type  increment)
inline

Definition at line 501 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator- ( difference_type  decrement) const
inline

Definition at line 491 of file iterator.h.

template<typename UnderlyingIterator>
template<typename OtherIt >
difference_type Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator- ( const Tf_ProxyReferenceReverseIterator< OtherIt > &  other) const
inline

Definition at line 496 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator& Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator-- ( )
inline

Definition at line 476 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator-- ( int  )
inline

Definition at line 481 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator& Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator-= ( difference_type  decrement)
inline

Definition at line 506 of file iterator.h.

template<typename UnderlyingIterator>
pointer Tf_ProxyReferenceReverseIterator< UnderlyingIterator >::operator-> ( ) const
inline

Customize operator-> to support proxied reference types Compatible with the C++20 specification.

Definition at line 461 of file iterator.h.

Friends And Related Function Documentation

template<typename UnderlyingIterator>
template<typename OtherIt >
bool operator!= ( const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  lhs,
const Tf_ProxyReferenceReverseIterator< OtherIt > &  rhs 
)
friend

Definition at line 526 of file iterator.h.

template<typename UnderlyingIterator>
Tf_ProxyReferenceReverseIterator operator+ ( const difference_type  increment,
const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  iterator 
)
friend

Definition at line 512 of file iterator.h.

template<typename UnderlyingIterator>
template<typename OtherIt >
bool operator< ( const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  lhs,
const Tf_ProxyReferenceReverseIterator< OtherIt > &  rhs 
)
friend

Definition at line 532 of file iterator.h.

template<typename UnderlyingIterator>
template<typename OtherIt >
bool operator<= ( const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  lhs,
const Tf_ProxyReferenceReverseIterator< OtherIt > &  rhs 
)
friend

Definition at line 544 of file iterator.h.

template<typename UnderlyingIterator>
template<typename OtherIt >
bool operator== ( const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  lhs,
const Tf_ProxyReferenceReverseIterator< OtherIt > &  rhs 
)
friend

Definition at line 520 of file iterator.h.

template<typename UnderlyingIterator>
template<typename OtherIt >
bool operator> ( const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  lhs,
const Tf_ProxyReferenceReverseIterator< OtherIt > &  rhs 
)
friend

Definition at line 538 of file iterator.h.

template<typename UnderlyingIterator>
template<typename OtherIt >
bool operator>= ( const Tf_ProxyReferenceReverseIterator< UnderlyingIterator > &  lhs,
const Tf_ProxyReferenceReverseIterator< OtherIt > &  rhs 
)
friend

Definition at line 550 of file iterator.h.


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