proxygen
folly::gen::detail::Interleave< Container > Class Template Reference

#include <Combine-inl.h>

Inheritance diagram for folly::gen::detail::Interleave< Container >:
folly::gen::Operator< Interleave< Container > > folly::gen::FBounded< Self >

Classes

class  Generator
 

Public Member Functions

 Interleave (Container container)
 
template<class Value2 , class Source , class Gen = Generator<Value2, Source>>
Gen compose (GenImpl< Value2, Source > &&source) const
 
template<class Value2 , class Source , class Gen = Generator<Value2, Source>>
Gen compose (const GenImpl< Value2, Source > &source) const
 
- Public Member Functions inherited from folly::gen::Operator< Interleave< Container > >
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

const std::shared_ptr< const Container > container_
 

Additional Inherited Members

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

Detailed Description

template<class Container>
class folly::gen::detail::Interleave< Container >

Interleave

Alternate values from a sequence with values from a sequence container. Stops once we run out of values from either source.

Definition at line 37 of file Combine-inl.h.

Constructor & Destructor Documentation

template<class Container >
folly::gen::detail::Interleave< Container >::Interleave ( Container  container)
inlineexplicit

Definition at line 42 of file Combine-inl.h.

43  : container_(new Container(std::move(container))) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
const std::shared_ptr< const Container > container_
Definition: Combine-inl.h:39

Member Function Documentation

template<class Container >
template<class Value2 , class Source , class Gen = Generator<Value2, Source>>
Gen folly::gen::detail::Interleave< Container >::compose ( GenImpl< Value2, Source > &&  source) const
inline

Definition at line 81 of file Combine-inl.h.

References folly::gen::move.

81  {
82  return Gen(std::move(source.self()), container_);
83  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
const std::shared_ptr< const Container > container_
Definition: Combine-inl.h:39
template<class Container >
template<class Value2 , class Source , class Gen = Generator<Value2, Source>>
Gen folly::gen::detail::Interleave< Container >::compose ( const GenImpl< Value2, Source > &  source) const
inline

Definition at line 86 of file Combine-inl.h.

References folly::gen::detail::Interleave< Container >::Generator< Value, Source >::container_, and folly::gen::FBounded< Self >::self().

86  {
87  return Gen(source.self(), container_);
88  }
const std::shared_ptr< const Container > container_
Definition: Combine-inl.h:39

Member Data Documentation

template<class Container >
const std::shared_ptr<const Container> folly::gen::detail::Interleave< Container >::container_
private

Definition at line 39 of file Combine-inl.h.


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