Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
util::details::FilterRangeForStruct< Range, Pred > Class Template Reference

#include <filterRangeFor.h>

Public Member Functions

 FilterRangeForStruct (Range &&range, Pred &&pred)
 Extracts the iterators from the specified range. More...
 
auto begin () const
 
auto end () const
 

Private Types

using begin_iterator_t = decltype(makeBeginIterator(std::declval< Range && >(), std::declval< Pred && >()))
 
using end_iterator_t = decltype(makeEndIterator(std::declval< Range && >(), std::declval< Pred && >()))
 

Static Private Member Functions

static auto getBegin (Range &&range) -> decltype(auto)
 Extract the begin iterator from a range. More...
 
static auto getEnd (Range &&range) -> decltype(auto)
 Extract the end iterator from a range. More...
 
static auto makeBeginIterator (Range &&range, Pred &&pred)
 Create a Boost filter iterator pointing to the beginning of data. More...
 
static auto makeEndIterator (Range &&range, Pred &&pred)
 Create a Boost filter iterator pointing to the end of data. More...
 

Private Attributes

begin_iterator_t fBegin
 
end_iterator_t fEnd
 

Detailed Description

template<typename Range, typename Pred>
class util::details::FilterRangeForStruct< Range, Pred >

Definition at line 74 of file filterRangeFor.h.

Member Typedef Documentation

template<typename Range , typename Pred >
using util::details::FilterRangeForStruct< Range, Pred >::begin_iterator_t = decltype (makeBeginIterator(std::declval<Range&&>(), std::declval<Pred&&>()))
private

Definition at line 103 of file filterRangeFor.h.

template<typename Range , typename Pred >
using util::details::FilterRangeForStruct< Range, Pred >::end_iterator_t = decltype (makeEndIterator(std::declval<Range&&>(), std::declval<Pred&&>()))
private

Definition at line 105 of file filterRangeFor.h.

Constructor & Destructor Documentation

template<typename Range , typename Pred >
util::details::FilterRangeForStruct< Range, Pred >::FilterRangeForStruct ( Range &&  range,
Pred &&  pred 
)
inline

Extracts the iterators from the specified range.

Definition at line 113 of file filterRangeFor.h.

114  : fBegin(
116  (std::forward<Range>(range), std::forward<Pred>(pred))
117  )
118  , fEnd(
120  (std::forward<Range>(range), std::forward<Pred>(pred))
121  )
122  {}
static auto makeEndIterator(Range &&range, Pred &&pred)
Create a Boost filter iterator pointing to the end of data.
static auto makeBeginIterator(Range &&range, Pred &&pred)
Create a Boost filter iterator pointing to the beginning of data.

Member Function Documentation

template<typename Range , typename Pred >
auto util::details::FilterRangeForStruct< Range, Pred >::begin ( ) const
inline

Definition at line 124 of file filterRangeFor.h.

124 { return fBegin; }
template<typename Range , typename Pred >
auto util::details::FilterRangeForStruct< Range, Pred >::end ( ) const
inline

Definition at line 125 of file filterRangeFor.h.

125 { return fEnd; }
template<typename Range , typename Pred >
static auto util::details::FilterRangeForStruct< Range, Pred >::getBegin ( Range &&  range) -> decltype(auto)
inlinestaticprivate

Extract the begin iterator from a range.

Definition at line 77 of file filterRangeFor.h.

78  { using std::begin; return begin(range); }
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
template<typename Range , typename Pred >
static auto util::details::FilterRangeForStruct< Range, Pred >::getEnd ( Range &&  range) -> decltype(auto)
inlinestaticprivate

Extract the end iterator from a range.

Definition at line 81 of file filterRangeFor.h.

82  { using std::end; return end(range); }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
template<typename Range , typename Pred >
static auto util::details::FilterRangeForStruct< Range, Pred >::makeBeginIterator ( Range &&  range,
Pred &&  pred 
)
inlinestaticprivate

Create a Boost filter iterator pointing to the beginning of data.

Definition at line 85 of file filterRangeFor.h.

86  {
87  auto begin = getBegin(std::forward<Range>(range));
88  auto end = getEnd(std::forward<Range>(range));
89  return
90  boost::make_filter_iterator(std::forward<Pred>(pred), begin, end);
91  }
static auto getBegin(Range &&range) -> decltype(auto)
Extract the begin iterator from a range.
static auto getEnd(Range &&range) -> decltype(auto)
Extract the end iterator from a range.
template<typename Range , typename Pred >
static auto util::details::FilterRangeForStruct< Range, Pred >::makeEndIterator ( Range &&  range,
Pred &&  pred 
)
inlinestaticprivate

Create a Boost filter iterator pointing to the end of data.

Definition at line 94 of file filterRangeFor.h.

95  {
96  auto end = getEnd(std::forward<Range>(range));
97  return
98  boost::make_filter_iterator(std::forward<Pred>(pred), end, end);
99  }
static auto getEnd(Range &&range) -> decltype(auto)
Extract the end iterator from a range.

Member Data Documentation

template<typename Range , typename Pred >
begin_iterator_t util::details::FilterRangeForStruct< Range, Pred >::fBegin
private

Definition at line 107 of file filterRangeFor.h.

template<typename Range , typename Pred >
end_iterator_t util::details::FilterRangeForStruct< Range, Pred >::fEnd
private

Definition at line 108 of file filterRangeFor.h.


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