proxygen
folly::gen::detail::Interleave< Container >::Generator< Value, Source > Class Template Reference

#include <Combine-inl.h>

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

Public Member Functions

 Generator (Source source, const std::shared_ptr< const Container > container)
 
template<class Handler >
bool apply (Handler &&handler) const
 
- Public Member Functions inherited from folly::gen::GenImpl< Value, Generator< Value, Source > >
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 ()
 

Private Types

typedef const Container::value_type & ConstRefType
 

Private Attributes

Source source_
 
const std::shared_ptr< const Container > container_
 

Additional Inherited Members

- Public Types inherited from folly::gen::GenImpl< Value, Generator< Value, Source > >
typedef Value ValueType
 
typedef std::decay< Value >::type StorageType
 
- Static Public Attributes inherited from folly::gen::GenImpl< Value, Generator< Value, Source > >
static constexpr bool infinite
 
- Protected Member Functions inherited from folly::gen::GenImpl< Value, Generator< Value, Source > >
 GenImpl ()=default
 
 GenImpl (GenImpl &&)=default
 
 GenImpl (const GenImpl &)=default
 
GenImploperator= (GenImpl &&)=default
 
GenImploperator= (const GenImpl &)=default
 

Detailed Description

template<class Container>
template<class Value, class Source>
class folly::gen::detail::Interleave< Container >::Generator< Value, Source >

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

Member Typedef Documentation

template<class Container >
template<class Value , class Source >
typedef const Container::value_type& folly::gen::detail::Interleave< Container >::Generator< Value, Source >::ConstRefType
private

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

Constructor & Destructor Documentation

template<class Container >
template<class Value , class Source >
folly::gen::detail::Interleave< Container >::Generator< Value, Source >::Generator ( Source  source,
const std::shared_ptr< const Container >  container 
)
inlineexplicit

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

59  : source_(std::move(source)), container_(container) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
const std::shared_ptr< const Container > container_
Definition: Combine-inl.h:48

Member Function Documentation

template<class Container >
template<class Value , class Source >
template<class Handler >
bool folly::gen::detail::Interleave< Container >::Generator< Value, Source >::apply ( Handler &&  handler) const
inline

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

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

62  {
63  auto iter = container_->begin();
64  return source_.apply([&](const Value& value) -> bool {
65  if (iter == container_->end()) {
66  return false;
67  }
68  if (!handler(value)) {
69  return false;
70  }
71  if (!handler(*iter)) {
72  return false;
73  }
74  iter++;
75  return true;
76  });
77  }
void handler(int, siginfo_t *, void *)
bool Value(const T &value, M matcher)
const std::shared_ptr< const Container > container_
Definition: Combine-inl.h:48
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)

Member Data Documentation

template<class Container >
template<class Value , class Source >
const std::shared_ptr<const Container> folly::gen::detail::Interleave< Container >::Generator< Value, Source >::container_
private
template<class Container >
template<class Value , class Source >
Source folly::gen::detail::Interleave< Container >::Generator< Value, Source >::source_
private

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


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