proxygen
folly::gen::detail::Skip Class Reference

#include <Base-inl.h>

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

Classes

class  Generator
 

Public Member Functions

 Skip (size_t count)
 
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen compose (GenImpl< Value, Source > &&source) const
 
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen compose (const GenImpl< Value, Source > &source) const
 
- Public Member Functions inherited from folly::gen::Operator< Skip >
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

size_t count_
 

Additional Inherited Members

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

Detailed Description

Skip - For skipping N items from the beginning of a source generator.

This type is usually used through the 'skip' helper function, like:

auto page = from(results) | skip(pageSize * startPage) | take(10);

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

Constructor & Destructor Documentation

folly::gen::detail::Skip::Skip ( size_t  count)
inlineexplicit

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

968 : count_(count) {}
constexpr detail::Count count
Definition: Base-inl.h:2551

Member Function Documentation

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

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

References folly::gen::move.

1015  {
1016  return Gen(std::move(source.self()), count_);
1017  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class Source , class Value , class Gen = Generator<Value, Source>>
Gen folly::gen::detail::Skip::compose ( const GenImpl< Value, Source > &  source) const
inline

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

References folly::gen::FBounded< Self >::self().

1020  {
1021  return Gen(source.self(), count_);
1022  }

Member Data Documentation

size_t folly::gen::detail::Skip::count_
private

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


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