proxygen
folly::detail::IteratorAdaptor< D, I, V, Tag > Class Template Reference

#include <Iterators.h>

Inheritance diagram for folly::detail::IteratorAdaptor< D, I, V, Tag >:
folly::detail::IteratorFacade< D, V, Tag >

Public Types

using Super = IteratorFacade< D, V, Tag >
 
using value_type = typename Super::value_type
 
using iterator_category = typename Super::iterator_category
 
using reference = typename Super::reference
 
using pointer = typename Super::pointer
 
using difference_type = typename Super::difference_type
 
- Public Types inherited from folly::detail::IteratorFacade< D, V, Tag >
using value_type = V
 
using reference = value_type &
 
using pointer = value_type *
 
using difference_type = ssize_t
 
using iterator_category = Tag
 

Public Member Functions

 IteratorAdaptor (I base)
 
void increment ()
 
void decrement ()
 
V & dereference () const
 
bool equal (D const &rhs) const
 
I const & base () const
 
I & base ()
 
- Public Member Functions inherited from folly::detail::IteratorFacade< D, V, Tag >
bool operator== (D const &rhs) const
 
bool operator!= (D const &rhs) const
 
template<class D2 >
std::enable_if< std::is_convertible< D, D2 >::value, bool >::type operator== (D2 const &rhs) const
 
template<class D2 >
bool operator!= (D2 const &rhs) const
 
V & operator* () const
 
V * operator-> () const
 
Doperator++ ()
 
D operator++ (int)
 
Doperator-- ()
 
D operator-- (int)
 

Private Attributes

base_
 

Detailed Description

template<class D, class I, class V, class Tag>
class folly::detail::IteratorAdaptor< D, I, V, Tag >

Wrap one iterator while providing an interator interface with e.g. a different value_type.

Template parameters: D: the deriving class (CRTP) I: the wrapper iterator type V: value type

Definition at line 157 of file Iterators.h.

Member Typedef Documentation

template<class D, class I, class V, class Tag>
using folly::detail::IteratorAdaptor< D, I, V, Tag >::difference_type = typename Super::difference_type

Definition at line 164 of file Iterators.h.

template<class D, class I, class V, class Tag>
using folly::detail::IteratorAdaptor< D, I, V, Tag >::iterator_category = typename Super::iterator_category

Definition at line 161 of file Iterators.h.

template<class D, class I, class V, class Tag>
using folly::detail::IteratorAdaptor< D, I, V, Tag >::pointer = typename Super::pointer

Definition at line 163 of file Iterators.h.

template<class D, class I, class V, class Tag>
using folly::detail::IteratorAdaptor< D, I, V, Tag >::reference = typename Super::reference

Definition at line 162 of file Iterators.h.

template<class D, class I, class V, class Tag>
using folly::detail::IteratorAdaptor< D, I, V, Tag >::Super = IteratorFacade<D, V, Tag>

Definition at line 159 of file Iterators.h.

template<class D, class I, class V, class Tag>
using folly::detail::IteratorAdaptor< D, I, V, Tag >::value_type = typename Super::value_type

Definition at line 160 of file Iterators.h.

Constructor & Destructor Documentation

template<class D, class I, class V, class Tag>
folly::detail::IteratorAdaptor< D, I, V, Tag >::IteratorAdaptor ( base)
inlineexplicit

Definition at line 166 of file Iterators.h.

Member Function Documentation

template<class D, class I, class V, class Tag>
I const& folly::detail::IteratorAdaptor< D, I, V, Tag >::base ( ) const
inline

Definition at line 184 of file Iterators.h.

Referenced by folly::dynamic::erase().

184  {
185  return base_;
186  }
template<class D, class I, class V, class Tag>
I& folly::detail::IteratorAdaptor< D, I, V, Tag >::base ( )
inline

Definition at line 187 of file Iterators.h.

187  {
188  return base_;
189  }
template<class D, class I, class V, class Tag>
void folly::detail::IteratorAdaptor< D, I, V, Tag >::decrement ( )
inline

Definition at line 172 of file Iterators.h.

172  {
173  --base_;
174  }
template<class D, class I, class V, class Tag>
V& folly::detail::IteratorAdaptor< D, I, V, Tag >::dereference ( ) const
inline

Definition at line 176 of file Iterators.h.

176  {
177  return *base_;
178  }
template<class D, class I, class V, class Tag>
bool folly::detail::IteratorAdaptor< D, I, V, Tag >::equal ( D const &  rhs) const
inline

Definition at line 180 of file Iterators.h.

180  {
181  return base_ == rhs.base_;
182  }
FOLLY_PUSH_WARNING RHS rhs
Definition: Traits.h:649
template<class D, class I, class V, class Tag>
void folly::detail::IteratorAdaptor< D, I, V, Tag >::increment ( )
inline

Definition at line 168 of file Iterators.h.

168  {
169  ++base_;
170  }

Member Data Documentation

template<class D, class I, class V, class Tag>
I folly::detail::IteratorAdaptor< D, I, V, Tag >::base_
private

Definition at line 192 of file Iterators.h.


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