proxygen
folly::gen::detail::Until< Predicate > Class Template Reference

#include <Base-inl.h>

Inheritance diagram for folly::gen::detail::Until< Predicate >:
folly::gen::Operator< Until< Predicate > > folly::gen::FBounded< Self >

Classes

class  Generator
 

Public Member Functions

 Until ()=default
 
 Until (Predicate pred)
 
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen compose (GenImpl< Value, Source > &&source) const
 
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen compose (const GenImpl< Value, Source > &source) const
 
- Public Member Functions inherited from folly::gen::Operator< Until< Predicate > >
ResultGen compose (const GenImpl< Value, Source > &source) const
 
- Public Member Functions inherited from folly::gen::FBounded< Self >
const Self & self () const
 
Self & self ()
 

Private Attributes

Predicate pred_
 

Additional Inherited Members

- Protected Member Functions inherited from folly::gen::Operator< Until< Predicate > >
 Operator ()=default
 
 Operator (Operator &&) noexcept=default
 
 Operator (const Operator &)=default
 
Operatoroperator= (Operator &&) noexcept=default
 
Operatoroperator= (const Operator &)=default
 

Detailed Description

template<class Predicate>
class folly::gen::detail::Until< Predicate >

Until - For producing values from a source until a predicate is satisfied.

This type is usually used through the 'until' helper function, like:

auto best = from(sortedItems) | until([](Item& item) { return item.score > 100; }) | as<std::vector>();

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

Constructor & Destructor Documentation

template<class Predicate >
folly::gen::detail::Until< Predicate >::Until ( )
default
template<class Predicate >
folly::gen::detail::Until< Predicate >::Until ( Predicate  pred)
inlineexplicit

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

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

Member Function Documentation

template<class Predicate >
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen folly::gen::detail::Until< Predicate >::compose ( GenImpl< Value, Source > &&  source) const
inline

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

References folly::gen::move.

674  {
675  return Gen(std::move(source.self()), pred_);
676  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class Predicate >
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen folly::gen::detail::Until< Predicate >::compose ( const GenImpl< Value, Source > &  source) const
inline

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

References folly::gen::FBounded< Self >::self().

679  {
680  return Gen(source.self(), pred_);
681  }

Member Data Documentation

template<class Predicate >
Predicate folly::gen::detail::Until< Predicate >::pred_
private

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


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