proxygen
folly::gen::detail::Visit< Visitor > Class Template Reference

#include <Base-inl.h>

Inheritance diagram for folly::gen::detail::Visit< Visitor >:
folly::gen::Operator< Visit< Visitor > > folly::gen::FBounded< Self >

Classes

class  Generator
 

Public Member Functions

 Visit ()=default
 
 Visit (Visitor visitor)
 
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< Visit< Visitor > >
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

Visitor visitor_
 

Additional Inherited Members

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

Detailed Description

template<class Visitor>
class folly::gen::detail::Visit< Visitor >

Visit - For calling a function on each item before passing it down the pipeline.

This type is usually used through the 'visit' helper function:

auto printedValues = seq(1) | visit(debugPrint); // nothing printed yet auto results = take(10) | as<std::vector>(); // results now populated, 10 values printed

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

Constructor & Destructor Documentation

template<class Visitor >
folly::gen::detail::Visit< Visitor >::Visit ( )
default
template<class Visitor >
folly::gen::detail::Visit< Visitor >::Visit ( Visitor  visitor)
inlineexplicit

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

758 : visitor_(std::move(visitor)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Function Documentation

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

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

References folly::gen::move.

789  {
790  return Gen(std::move(source.self()), visitor_);
791  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class Visitor >
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen folly::gen::detail::Visit< Visitor >::compose ( const GenImpl< Value, Source > &  source) const
inline

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

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

794  {
795  return Gen(source.self(), visitor_);
796  }

Member Data Documentation

template<class Visitor >
Visitor folly::gen::detail::Visit< Visitor >::visitor_
private

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


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