proxygen
folly::gen::detail::ReferencedSource< Container, Value > Class Template Reference

#include <Base-inl.h>

Inheritance diagram for folly::gen::detail::ReferencedSource< Container, Value >:
folly::gen::GenImpl< Value, ReferencedSource< Container, Value > > folly::gen::FBounded< Self >

Public Member Functions

 ReferencedSource (Container *container)
 
template<class Body >
void foreach (Body &&body) const
 
template<class Handler >
bool apply (Handler &&handler) const
 
- Public Member Functions inherited from folly::gen::GenImpl< Value, ReferencedSource< Container, Value > >
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 ()
 

Static Public Attributes

static constexpr bool infinite = false
 
- Static Public Attributes inherited from folly::gen::GenImpl< Value, ReferencedSource< Container, Value > >
static constexpr bool infinite
 

Private Attributes

Container * container_
 

Additional Inherited Members

- Public Types inherited from folly::gen::GenImpl< Value, ReferencedSource< Container, Value > >
typedef Value ValueType
 
typedef std::decay< Value >::type StorageType
 
- Protected Member Functions inherited from folly::gen::GenImpl< Value, ReferencedSource< Container, Value > >
 GenImpl ()=default
 
 GenImpl (GenImpl &&)=default
 
 GenImpl (const GenImpl &)=default
 
GenImploperator= (GenImpl &&)=default
 
GenImploperator= (const GenImpl &)=default
 

Detailed Description

template<class Container, class Value>
class folly::gen::detail::ReferencedSource< Container, Value >

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

Constructor & Destructor Documentation

template<class Container , class Value >
folly::gen::detail::ReferencedSource< Container, Value >::ReferencedSource ( Container *  container)
inlineexplicit

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

134 : container_(container) {}

Member Function Documentation

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

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

References handler(), and value.

144  {
145  for (auto& value : *container_) {
146  if (!handler(std::forward<Value>(value))) {
147  return false;
148  }
149  }
150  return true;
151  }
void handler(int, siginfo_t *, void *)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class Container , class Value >
template<class Body >
void folly::gen::detail::ReferencedSource< Container, Value >::foreach ( Body &&  body) const
inline

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

References value.

137  {
138  for (auto& value : *container_) {
139  body(std::forward<Value>(value));
140  }
141  }
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)

Member Data Documentation

template<class Container , class Value >
Container* folly::gen::detail::ReferencedSource< Container, Value >::container_
private

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

template<class Container , class Value >
constexpr bool folly::gen::detail::ReferencedSource< Container, Value >::infinite = false
static

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


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