LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT > Class Template Reference

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

#include <iterators.hpp>

Inheritance diagram for LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >:
Collaboration diagram for LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >:

Public Types

using difference_type = DifferenceTypeT
 
- Public Types inherited from LIEF::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
using iterator_category = IteratorCategoryT
 
using value_type = T
 
using difference_type = DifferenceTypeT
 
using pointer = PointerT
 
using reference = ReferenceT
 

Public Member Functions

DerivedT & operator+= (difference_type n)
 
DerivedT & operator-= (difference_type n)
 
difference_type operator- (const DerivedT &RHS) const
 
DerivedT & operator++ ()
 
DerivedT & operator-- ()
 
ReferenceT operator* () const
 
- Public Member Functions inherited from LIEF::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
DerivedT operator+ (DifferenceTypeT n) const
 
DerivedT operator- (DifferenceTypeT n) const
 
DerivedT & operator++ ()
 
DerivedT operator++ (int)
 
DerivedT & operator-- ()
 
DerivedT operator-- (int)
 
bool operator!= (const DerivedT &RHS) const
 
bool operator> (const DerivedT &RHS) const
 
bool operator<= (const DerivedT &RHS) const
 
bool operator>= (const DerivedT &RHS) const
 
PointerProxy operator-> () const
 
ReferenceProxy operator[] (DifferenceTypeT n) const
 

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
class LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >

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.

Member Typedef Documentation

◆ difference_type

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
using LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::difference_type = DifferenceTypeT

Member Function Documentation

◆ operator*()

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
ReferenceT LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::operator* ( ) const
inline

◆ operator++()

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
DerivedT & LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::operator++ ( )
inline

◆ operator+=()

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
DerivedT & LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::operator+= ( difference_type n)
inline

◆ operator-()

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
difference_type LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::operator- ( const DerivedT & RHS) const
inline

◆ operator--()

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
DerivedT & LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::operator-- ( )
inline

◆ operator-=()

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 = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::pointer, T *>, typename ReferenceT = typename std::conditional< std::is_same<T, typename std::iterator_traits< WrappedIteratorT>::value_type>::value, typename std::iterator_traits<WrappedIteratorT>::reference, T &>::type>
DerivedT & LIEF::iterator_adaptor_base< DerivedT, WrappedIteratorT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::operator-= ( difference_type n)
inline

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