LLVM API Documentation

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT > Class Template Reference

CRTP base class for adapting an iterator to a different type. More...

#include <iterator.h>

Inheritance diagram for llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >:
Inheritance graph
[legend]
Collaboration diagram for llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef DifferenceTypeT difference_type

Public Member Functions

DerivedT & operator+= (difference_type n)
DerivedT & operator-= (difference_type n)
difference_type operator- (const DerivedT &RHS) const
DerivedT & operator++ ()
DerivedT & operator-- ()
bool operator== (const DerivedT &RHS) const
bool operator< (const DerivedT &RHS) const
ReferenceT operator* () const

Protected Member Functions

 iterator_adaptor_base ()
template<typename U >
 iterator_adaptor_base (U &&u, typename std::enable_if< !std::is_base_of< typename std::remove_cv< typename std::remove_reference< U >::type >::type, DerivedT >::value, int >::type=0)

Protected Attributes

WrappedIteratorT I

Detailed Description

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
class llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >

CRTP base class for adapting an iterator to a different type.

This class can be used through CRTP to adapt one iterator into another. Typically this is done through providing in the derived class a custom operator* implementation. Other methods can be overridden as well.

Definition at line 145 of file iterator.h.


Member Typedef Documentation

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
typedef DifferenceTypeT llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::difference_type

Definition at line 166 of file iterator.h.


Constructor & Destructor Documentation

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::iterator_adaptor_base ( ) [inline, protected]

Definition at line 153 of file iterator.h.

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
template<typename U >
llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::iterator_adaptor_base ( U &&  u,
typename std::enable_if< !std::is_base_of< typename std::remove_cv< typename std::remove_reference< U >::type >::type, DerivedT >::value, int >::type  = 0 
) [inline, explicit, protected]

Definition at line 156 of file iterator.h.


Member Function Documentation

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
ReferenceT llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator* ( ) const [inline]
template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
DerivedT& llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator++ ( ) [inline]
template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
DerivedT& llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator+= ( difference_type  n) [inline]

Definition at line 168 of file iterator.h.

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
difference_type llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator- ( const DerivedT &  RHS) const [inline]

Definition at line 183 of file iterator.h.

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
DerivedT& llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator-- ( ) [inline]
template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
DerivedT& llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator-= ( difference_type  n) [inline]

Definition at line 175 of file iterator.h.

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
bool llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator< ( const DerivedT &  RHS) const [inline]

Definition at line 207 of file iterator.h.

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
bool llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::operator== ( const DerivedT &  RHS) const [inline]

Definition at line 206 of file iterator.h.


Member Data Documentation

template<typename DerivedT, typename WrappedIteratorT, typename IteratorCategoryT = typename std::iterator_traits<WrappedIteratorT>::iterator_category, typename T = typename std::iterator_traits<WrappedIteratorT>::value_type, typename DifferenceTypeT = typename std::iterator_traits<WrappedIteratorT>::difference_type, typename PointerT = T *, typename ReferenceT = T &, typename WrappedTraitsT = std::iterator_traits<WrappedIteratorT>>
WrappedIteratorT llvm::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT, WrappedTraitsT >::I [protected]

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