proxygen
folly::gen::Group< Key, Value > Class Template Reference

#include <Base-inl.h>

Inheritance diagram for folly::gen::Group< Key, Value >:
folly::gen::GenImpl< Value &&, Group< Key, Value > > folly::gen::FBounded< Self >

Public Types

typedef std::vector< Value > VectorType
 
typedef Key KeyType
 
typedef Value ValueType
 
- Public Types inherited from folly::gen::GenImpl< Value &&, Group< Key, Value > >
typedef Value && ValueType
 
typedef std::decay< Value && >::type StorageType
 

Public Member Functions

 Group (Key key, VectorType values)
 
const Key & key () const
 
size_t size () const
 
const VectorTypevalues () const
 
VectorTypevalues ()
 
VectorType operator| (const detail::Collect< VectorType > &) const
 
VectorType operator| (const detail::CollectTemplate< std::vector > &) const
 
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 &&, Group< Key, 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 &&, Group< Key, Value > >
static constexpr bool infinite
 

Private Attributes

Key key_
 
VectorType values_
 

Additional Inherited Members

- Protected Member Functions inherited from folly::gen::GenImpl< Value &&, Group< Key, Value > >
 GenImpl ()=default
 
 GenImpl (GenImpl &&)=default
 
 GenImpl (const GenImpl &)=default
 
GenImploperator= (GenImpl &&)=default
 
GenImploperator= (const GenImpl &)=default
 

Detailed Description

template<class Key, class Value>
class folly::gen::Group< Key, Value >

Group - The output objects from the GroupBy operator

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

Member Typedef Documentation

template<class Key, class Value>
typedef Key folly::gen::Group< Key, Value >::KeyType

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

template<class Key, class Value>
typedef Value folly::gen::Group< Key, Value >::ValueType

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

template<class Key, class Value>
typedef std::vector<Value> folly::gen::Group< Key, Value >::VectorType

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

Constructor & Destructor Documentation

template<class Key, class Value>
folly::gen::Group< Key, Value >::Group ( Key  key,
VectorType  values 
)
inline

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

const VectorType & values() const
Definition: Base-inl.h:68
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
VectorType values_
Definition: Base-inl.h:105
const Key & key() const
Definition: Base-inl.h:61

Member Function Documentation

template<class Key, class Value>
template<class Handler >
bool folly::gen::Group< Key, Value >::apply ( Handler &&  handler) const
inline

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

References handler(), folly::gen::move, and value.

91  {
92  for (auto& value : values_) {
93  if (!handler(std::move(value))) {
94  return false;
95  }
96  }
97  return true;
98  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void handler(int, siginfo_t *, void *)
VectorType values_
Definition: Base-inl.h:105
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class Key, class Value>
template<class Body >
void folly::gen::Group< Key, Value >::foreach ( Body &&  body) const
inline

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

References folly::gen::move, and value.

84  {
85  for (auto& value : values_) {
86  body(std::move(value));
87  }
88  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
VectorType values_
Definition: Base-inl.h:105
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class Key, class Value>
const Key& folly::gen::Group< Key, Value >::key ( ) const
inline

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

Referenced by TEST().

61  {
62  return key_;
63  }
template<class Key, class Value>
VectorType folly::gen::Group< Key, Value >::operator| ( const detail::Collect< VectorType > &  ) const
inline

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

References values().

75  {
76  return values();
77  }
const VectorType & values() const
Definition: Base-inl.h:68
template<class Key, class Value>
VectorType folly::gen::Group< Key, Value >::operator| ( const detail::CollectTemplate< std::vector > &  ) const
inline

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

References values().

79  {
80  return values();
81  }
const VectorType & values() const
Definition: Base-inl.h:68
template<class Key, class Value>
size_t folly::gen::Group< Key, Value >::size ( ) const
inline

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

Referenced by TEST().

65  {
66  return values_.size();
67  }
VectorType values_
Definition: Base-inl.h:105
template<class Key, class Value>
const VectorType& folly::gen::Group< Key, Value >::values ( ) const
inline

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

68  {
69  return values_;
70  }
VectorType values_
Definition: Base-inl.h:105
template<class Key, class Value>
VectorType& folly::gen::Group< Key, Value >::values ( )
inline

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

71  {
72  return values_;
73  }
VectorType values_
Definition: Base-inl.h:105

Member Data Documentation

template<class Key, class Value>
constexpr bool folly::gen::Group< Key, Value >::infinite = false
static

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

template<class Key, class Value>
Key folly::gen::Group< Key, Value >::key_
private

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

template<class Key, class Value>
VectorType folly::gen::Group< Key, Value >::values_
mutableprivate

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


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