LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::ref_iterator< T, U, ITERATOR_T > Class Template Reference

Iterator which returns reference on container's values. More...

#include <iterators.hpp>

Public Types

using iterator_category = std::bidirectional_iterator_tag
 
using value_type = decay_t<U>
 
using difference_type = ptrdiff_t
 
using pointer = typename std::remove_pointer<U>::type*
 
using reference = typename std::remove_pointer<U>::type&
 
using container_type = T
 
using DT_VAL = U
 
using DT = decay_t<T>
 
using ref_t = typename ref_iterator::reference
 
using pointer_t = typename ref_iterator::pointer
 

Public Member Functions

 ref_iterator (T container)
 
 ref_iterator (const ref_iterator &copy)
 
ref_iteratoroperator= (ref_iterator other)
 
void swap (ref_iterator &other) noexcept
 
ref_iteratoroperator++ ()
 
ref_iterator operator++ (int)
 
ref_iteratoroperator-- ()
 
ref_iterator operator-- (int)
 
ref_iteratoroperator+= (const typename ref_iterator::difference_type &movement)
 
ref_iteratoroperator-= (const typename ref_iterator::difference_type &movement)
 
std::enable_if<!std::is_const< ref_t >::value, remove_const_t< ref_t > >::type operator[] (size_t n)
 
add_const_t< ref_toperator[] (size_t n) const
 
ref_iterator operator+ (typename ref_iterator::difference_type n) const
 
ref_iterator operator- (typename ref_iterator::difference_type n) const
 
ref_iterator::difference_type operator- (const ref_iterator &rhs) const
 
bool operator< (const ref_iterator &rhs) const
 
bool operator> (const ref_iterator &rhs) const
 
bool operator>= (const ref_iterator &rhs) const
 
bool operator<= (const ref_iterator &rhs) const
 
ref_iterator begin () const
 
ref_iterator cbegin () const
 
ref_iterator end () const
 
ref_iterator cend () const
 
bool operator== (const ref_iterator &other) const
 
bool operator!= (const ref_iterator &other) const
 
size_t size () const
 
bool empty () const
 
std::enable_if<!std::is_const< ref_t >::value, remove_const_t< ref_t > >::type operator* ()
 
template<typename V = DT_VAL>
std::enable_if< std::is_pointer< V >::value, add_const_t< ref_t > >::type operator* () const
 
template<typename V = DT_VAL>
std::enable_if<!std::is_pointer< V >::value, add_const_t< ref_t > >::type operator* () const
 
std::enable_if<!std::is_const< pointer_t >::value, pointer_t >::type operator-> ()
 
add_const_t< pointer_toperator-> () const
 

Detailed Description

template<class T, typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
class LIEF::ref_iterator< T, U, ITERATOR_T >

Iterator which returns reference on container's values.

Member Typedef Documentation

◆ container_type

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::container_type = T

◆ difference_type

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::difference_type = ptrdiff_t

◆ DT

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::DT = decay_t<T>

◆ DT_VAL

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::DT_VAL = U

◆ iterator_category

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::iterator_category = std::bidirectional_iterator_tag

◆ pointer

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::pointer = typename std::remove_pointer<U>::type*

◆ pointer_t

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::pointer_t = typename ref_iterator::pointer

◆ ref_t

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::ref_t = typename ref_iterator::reference

◆ reference

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::reference = typename std::remove_pointer<U>::type&

◆ value_type

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::ref_iterator< T, U, ITERATOR_T >::value_type = decay_t<U>

Constructor & Destructor Documentation

◆ ref_iterator() [1/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
LIEF::ref_iterator< T, U, ITERATOR_T >::ref_iterator ( T container)
inline

◆ ref_iterator() [2/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
LIEF::ref_iterator< T, U, ITERATOR_T >::ref_iterator ( const ref_iterator< T, U, ITERATOR_T > & copy)
inline

References begin(), and ref_iterator().

Member Function Documentation

◆ begin()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::begin ( ) const
inline

References ref_iterator().

Referenced by cbegin(), and ref_iterator().

◆ cbegin()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::cbegin ( ) const
inline

References begin(), and ref_iterator().

◆ cend()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::cend ( ) const
inline

References end(), and ref_iterator().

◆ empty()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::empty ( ) const
inline

◆ end()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::end ( ) const
inline

◆ operator!=()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::operator!= ( const ref_iterator< T, U, ITERATOR_T > & other) const
inline

References ref_iterator().

◆ operator*() [1/3]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
std::enable_if<!std::is_const< ref_t >::value, remove_const_t< ref_t > >::type LIEF::ref_iterator< T, U, ITERATOR_T >::operator* ( )
inline

References ref_iterator().

Referenced by operator->().

◆ operator*() [2/3]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
template<typename V = DT_VAL>
std::enable_if< std::is_pointer< V >::value, add_const_t< ref_t > >::type LIEF::ref_iterator< T, U, ITERATOR_T >::operator* ( ) const
inline

◆ operator*() [3/3]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
template<typename V = DT_VAL>
std::enable_if<!std::is_pointer< V >::value, add_const_t< ref_t > >::type LIEF::ref_iterator< T, U, ITERATOR_T >::operator* ( ) const
inline

◆ operator+()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::operator+ ( typename ref_iterator< T, U, ITERATOR_T >::difference_type n) const
inline

References ref_iterator().

◆ operator++() [1/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator & LIEF::ref_iterator< T, U, ITERATOR_T >::operator++ ( )
inline

References ref_iterator().

◆ operator++() [2/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::operator++ ( int )
inline

References ref_iterator().

◆ operator+=()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator & LIEF::ref_iterator< T, U, ITERATOR_T >::operator+= ( const typename ref_iterator< T, U, ITERATOR_T >::difference_type & movement)
inline

References ref_iterator().

◆ operator-() [1/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator::difference_type LIEF::ref_iterator< T, U, ITERATOR_T >::operator- ( const ref_iterator< T, U, ITERATOR_T > & rhs) const
inline

References ref_iterator().

◆ operator-() [2/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::operator- ( typename ref_iterator< T, U, ITERATOR_T >::difference_type n) const
inline

References ref_iterator().

◆ operator--() [1/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator & LIEF::ref_iterator< T, U, ITERATOR_T >::operator-- ( )
inline

References ref_iterator().

◆ operator--() [2/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator LIEF::ref_iterator< T, U, ITERATOR_T >::operator-- ( int )
inline

References ref_iterator().

◆ operator-=()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator & LIEF::ref_iterator< T, U, ITERATOR_T >::operator-= ( const typename ref_iterator< T, U, ITERATOR_T >::difference_type & movement)
inline

References ref_iterator().

◆ operator->() [1/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
std::enable_if<!std::is_const< pointer_t >::value, pointer_t >::type LIEF::ref_iterator< T, U, ITERATOR_T >::operator-> ( )
inline

References ref_iterator().

◆ operator->() [2/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
add_const_t< pointer_t > LIEF::ref_iterator< T, U, ITERATOR_T >::operator-> ( ) const
inline

References operator*().

◆ operator<()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::operator< ( const ref_iterator< T, U, ITERATOR_T > & rhs) const
inline

References ref_iterator().

◆ operator<=()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::operator<= ( const ref_iterator< T, U, ITERATOR_T > & rhs) const
inline

References ref_iterator().

◆ operator=()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
ref_iterator & LIEF::ref_iterator< T, U, ITERATOR_T >::operator= ( ref_iterator< T, U, ITERATOR_T > other)
inline

References ref_iterator(), and swap().

◆ operator==()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::operator== ( const ref_iterator< T, U, ITERATOR_T > & other) const
inline

References ref_iterator(), and size().

◆ operator>()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::operator> ( const ref_iterator< T, U, ITERATOR_T > & rhs) const
inline

References ref_iterator().

◆ operator>=()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::ref_iterator< T, U, ITERATOR_T >::operator>= ( const ref_iterator< T, U, ITERATOR_T > & rhs) const
inline

References ref_iterator().

◆ operator[]() [1/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
std::enable_if<!std::is_const< ref_t >::value, remove_const_t< ref_t > >::type LIEF::ref_iterator< T, U, ITERATOR_T >::operator[] ( size_t n)
inline

References ref_iterator().

◆ operator[]() [2/2]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
add_const_t< ref_t > LIEF::ref_iterator< T, U, ITERATOR_T >::operator[] ( size_t n) const
inline

References ref_iterator(), and size().

◆ size()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
size_t LIEF::ref_iterator< T, U, ITERATOR_T >::size ( ) const
inline

Referenced by end(), operator==(), and operator[]().

◆ swap()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
void LIEF::ref_iterator< T, U, ITERATOR_T >::swap ( ref_iterator< T, U, ITERATOR_T > & other)
inlinenoexcept

References ref_iterator().

Referenced by operator=().


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