proxygen
folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result > Class Template Reference

#include <Combine-inl.h>

Inheritance diagram for folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >:
folly::gen::GenImpl< Result, Generator< Value1, Source, Value2, Result > > 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< Result, Generator< Value1, Source, Value2, Result > >
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 Attributes

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

Additional Inherited Members

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

Detailed Description

template<class Container>
template<class Value1, class Source, class Value2 = decltype(*std::begin(*container_)), class Result = std::tuple< typename std::decay<Value1>::type, typename std::decay<Value2>::type>>
class folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >

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

Constructor & Destructor Documentation

template<class Container >
template<class Value1 , class Source , class Value2 = decltype(*std::begin(*container_)), class Result = std::tuple< typename std::decay<Value1>::type, typename std::decay<Value2>::type>>
folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >::Generator ( Source  source,
const std::shared_ptr< const Container >  container 
)
inlineexplicit

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

123  : 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:117

Member Function Documentation

template<class Container >
template<class Value1 , class Source , class Value2 = decltype(*std::begin(*container_)), class Result = std::tuple< typename std::decay<Value1>::type, typename std::decay<Value2>::type>>
template<class Handler >
bool folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >::apply ( Handler &&  handler) const
inline

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

References handler(), if(), std::tr1::make_tuple(), and folly::value().

126  {
127  auto iter = container_->begin();
128  return (source_.apply([&](Value1 value) -> bool {
129  if (iter == container_->end()) {
130  return false;
131  }
132  if (!handler(std::make_tuple(std::forward<Value1>(value), *iter))) {
133  return false;
134  }
135  ++iter;
136  return true;
137  }));
138  }
tuple make_tuple()
Definition: gtest-tuple.h:675
void handler(int, siginfo_t *, void *)
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
const std::shared_ptr< const Container > container_
Definition: Combine-inl.h:117

Member Data Documentation

template<class Container >
template<class Value1 , class Source , class Value2 = decltype(*std::begin(*container_)), class Result = std::tuple< typename std::decay<Value1>::type, typename std::decay<Value2>::type>>
const std::shared_ptr<const Container> folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >::container_
private

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

template<class Container >
template<class Value1 , class Source , class Value2 = decltype(*std::begin(*container_)), class Result = std::tuple< typename std::decay<Value1>::type, typename std::decay<Value2>::type>>
Source folly::gen::detail::Zip< Container >::Generator< Value1, Source, Value2, Result >::source_
private

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


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