proxygen
|
#include <Core-inl.h>
Public Types | |
typedef Value | ValueType |
typedef std::decay< Value >::type | StorageType |
Public Member Functions | |
template<class Handler > | |
bool | apply (Handler &&handler) const |
template<class Body > | |
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 = false |
Protected Member Functions | |
GenImpl ()=default | |
GenImpl (GenImpl &&)=default | |
GenImpl (const GenImpl &)=default | |
GenImpl & | operator= (GenImpl &&)=default |
GenImpl & | operator= (const GenImpl &)=default |
GenImpl - Core abstraction of a generator, an object which produces values by passing them to a given handler lambda. All generator implementations must implement apply(). foreach() may also be implemented to special case the condition where the entire sequence is consumed.
Definition at line 146 of file Core-inl.h.
typedef std::decay<Value>::type folly::gen::GenImpl< Value, Self >::StorageType |
Definition at line 157 of file Core-inl.h.
typedef Value folly::gen::GenImpl< Value, Self >::ValueType |
Definition at line 156 of file Core-inl.h.
|
protecteddefault |
|
protecteddefault |
|
protecteddefault |
bool folly::gen::GenImpl< Value, Self >::apply | ( | Handler && | handler | ) | const |
apply() - Send all values produced by this generator to given handler until the handler returns false. Returns false if and only if the handler passed in returns false. Note: It should return true even if it completes (without the handler returning false), as 'Chain' uses the return value of apply to determine if it should process the second object in its chain.
|
inline |
foreach() - Send all values produced by this generator to given lambda.
Definition at line 173 of file Core-inl.h.
Referenced by folly::gen::detail::FileWriter::compose().
|
protecteddefault |
|
protecteddefault |
|
static |
Definition at line 191 of file Core-inl.h.