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

#include <Base-inl.h>

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

Public Member Functions

 Generator (Source source)
 
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_
 

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 Value, class Source, class Result = decltype(*std::declval<Value>())>
class folly::gen::detail::Dereference::Generator< Value, Source, Result >

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

Constructor & Destructor Documentation

template<class Value , class Source , class Result = decltype(*std::declval<Value>())>
folly::gen::detail::Dereference::Generator< Value, Source, Result >::Generator ( Source  source)
inlineexplicit

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

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

Member Function Documentation

template<class Value , class Source , class Result = decltype(*std::declval<Value>())>
template<class Handler >
bool folly::gen::detail::Dereference::Generator< Value, Source, Result >::apply ( Handler &&  handler) const
inline

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

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

1828  {
1829  return source_.apply([&](Value value) -> bool {
1830  if (value) {
1831  return handler(*std::forward<Value>(value));
1832  }
1833  return true;
1834  });
1835  }
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 Value , class Source , class Result = decltype(*std::declval<Value>())>
template<class Body >
void folly::gen::detail::Dereference::Generator< Value, Source, Result >::foreach ( Body &&  body) const
inline

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

References value, and testing::Value().

1819  {
1820  source_.foreach([&](Value value) {
1821  if (value) {
1822  return body(*std::forward<Value>(value));
1823  }
1824  });
1825  }
bool Value(const T &value, M matcher)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)

Member Data Documentation

template<class Value , class Source , class Result = decltype(*std::declval<Value>())>
constexpr bool folly::gen::detail::Dereference::Generator< Value, Source, Result >::infinite = Source::infinite
static

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

template<class Value , class Source , class Result = decltype(*std::declval<Value>())>
Source folly::gen::detail::Dereference::Generator< Value, Source, Result >::source_
private

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


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