proxygen
folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result > Class Template Reference

#include <Base-inl.h>

Inheritance diagram for folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >:
folly::gen::GenImpl< Result, Generator< Value, Source, Result > > folly::gen::FBounded< Self >

Public Member Functions

 Generator (Source source, const Predicate &pred)
 
template<class Body >
void foreach (Body &&body) const
 
template<class Handler >
bool apply (Handler &&handler) const
 
- Public Member Functions inherited from folly::gen::GenImpl< Result, Generator< Value, Source, Result > >
bool apply (Handler &&handler) const
 
void foreach (Body &&body) const
 
- Public Member Functions inherited from folly::gen::FBounded< Self >
const Self & self () const
 
Self & self ()
 

Static Public Attributes

static constexpr bool infinite = Source::infinite
 
- Static Public Attributes inherited from folly::gen::GenImpl< Result, Generator< Value, Source, Result > >
static constexpr bool infinite
 

Private Attributes

Source source_
 
Predicate pred_
 

Additional Inherited Members

- Public Types inherited from folly::gen::GenImpl< Result, Generator< Value, Source, Result > >
typedef Result ValueType
 
typedef std::decay< Result >::type StorageType
 
- Protected Member Functions inherited from folly::gen::GenImpl< Result, Generator< Value, Source, Result > >
 GenImpl ()=default
 
 GenImpl (GenImpl &&)=default
 
 GenImpl (const GenImpl &)=default
 
GenImploperator= (GenImpl &&)=default
 
GenImploperator= (const GenImpl &)=default
 

Detailed Description

template<class Predicate>
template<class Value, class Source, class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
class folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >

Definition at line 523 of file Base-inl.h.

Constructor & Destructor Documentation

template<class Predicate>
template<class Value , class Source , class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >::Generator ( Source  source,
const Predicate &  pred 
)
inlineexplicit

Definition at line 528 of file Base-inl.h.

529  : source_(std::move(source)), pred_(pred) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Function Documentation

template<class Predicate>
template<class Value , class Source , class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
template<class Handler >
bool folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >::apply ( Handler &&  handler) const
inline

Definition at line 538 of file Base-inl.h.

References handler(), value, and testing::Value().

538  {
539  return source_.apply([&](Value value) {
540  return handler(pred_(std::forward<Value>(value)));
541  });
542  }
void handler(int, siginfo_t *, void *)
bool Value(const T &value, M matcher)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class Predicate>
template<class Value , class Source , class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
template<class Body >
void folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >::foreach ( Body &&  body) const
inline

Definition at line 532 of file Base-inl.h.

References value, and testing::Value().

532  {
533  source_.foreach(
534  [&](Value value) { body(pred_(std::forward<Value>(value))); });
535  }
bool Value(const T &value, M matcher)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)

Member Data Documentation

template<class Predicate>
template<class Value , class Source , class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
constexpr bool folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >::infinite = Source::infinite
static

Definition at line 544 of file Base-inl.h.

template<class Predicate>
template<class Value , class Source , class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
Predicate folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >::pred_
private

Definition at line 525 of file Base-inl.h.

template<class Predicate>
template<class Value , class Source , class Result = typename ArgumentReference<invoke_result_t<Predicate, Value>>::type>
Source folly::gen::detail::Map< Predicate >::Generator< Value, Source, Result >::source_
private

Definition at line 524 of file Base-inl.h.


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