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

Iterator which return a ref on container's values given predicates. More...

#include <iterators.hpp>

Public Types

using iterator_category = std::forward_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 filter_iterator::reference
 
using pointer_t = typename filter_iterator::pointer
 
using filter_t = std::function<bool (const typename DT::value_type&)>
 

Public Member Functions

 filter_iterator (T container, filter_t filter)
 
 filter_iterator (T container, const std::vector< filter_t > &filters)
 
 filter_iterator (T container)
 
 filter_iterator (const filter_iterator &copy)
 
filter_iteratoroperator= (filter_iterator other)
 
void swap (filter_iterator &other) noexcept
 
filter_iteratordef (filter_t func)
 
filter_iteratoroperator++ ()
 
filter_iterator operator++ (int)
 
filter_iterator begin () const
 
filter_iterator cbegin () const
 
filter_iterator end () const
 
filter_iterator cend () 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< ref_t >::value, remove_const_t< ref_t > >::type operator[] (size_t n)
 
add_const_t< ref_toperator[] (size_t n) const
 
std::enable_if<!std::is_const< pointer_t >::value, pointer_t >::type operator-> ()
 
add_const_t< pointer_toperator-> () const
 
size_t size () const
 
bool empty () const
 
bool operator== (const filter_iterator &other) const
 
bool operator!= (const filter_iterator &other) const
 

Detailed Description

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

Iterator which return a ref on container's values given predicates.

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::filter_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::filter_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::filter_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::filter_iterator< T, U, ITERATOR_T >::DT_VAL = U

◆ filter_t

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::filter_iterator< T, U, ITERATOR_T >::filter_t = std::function<bool (const typename DT::value_type&)>

◆ iterator_category

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

◆ pointer

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::filter_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::filter_iterator< T, U, ITERATOR_T >::pointer_t = typename filter_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::filter_iterator< T, U, ITERATOR_T >::ref_t = typename filter_iterator::reference

◆ reference

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
using LIEF::filter_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::filter_iterator< T, U, ITERATOR_T >::value_type = decay_t<U>

Constructor & Destructor Documentation

◆ filter_iterator() [1/4]

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

◆ filter_iterator() [2/4]

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
LIEF::filter_iterator< T, U, ITERATOR_T >::filter_iterator ( T container,
const std::vector< filter_t > & filters )
inline

◆ filter_iterator() [3/4]

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

◆ filter_iterator() [4/4]

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

Member Function Documentation

◆ begin()

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

◆ cbegin()

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

◆ cend()

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

◆ def()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
filter_iterator & LIEF::filter_iterator< T, U, ITERATOR_T >::def ( filter_t func)
inline

◆ empty()

template<class T , typename U = typename decay_t<T>::value_type, class ITERATOR_T = typename decay_t<T>::iterator>
bool LIEF::filter_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>
filter_iterator LIEF::filter_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::filter_iterator< T, U, ITERATOR_T >::operator!= ( const filter_iterator< T, U, ITERATOR_T > & other) const
inline

◆ 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::filter_iterator< T, U, ITERATOR_T >::operator* ( )
inline

◆ 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::filter_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::filter_iterator< T, U, ITERATOR_T >::operator* ( ) const
inline

◆ operator++() [1/2]

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

◆ operator++() [2/2]

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

◆ 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::filter_iterator< T, U, ITERATOR_T >::operator-> ( )
inline

◆ 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::filter_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>
filter_iterator & LIEF::filter_iterator< T, U, ITERATOR_T >::operator= ( filter_iterator< T, U, ITERATOR_T > other)
inline

◆ operator==()

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

◆ 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::filter_iterator< T, U, ITERATOR_T >::operator[] ( size_t n)
inline

◆ 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::filter_iterator< T, U, ITERATOR_T >::operator[] ( size_t n) const
inline

◆ size()

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

◆ swap()

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

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