proxygen
folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator Class Reference

#include <ThreadLocal.h>

Public Types

using difference_type = ssize_t
 
using value_type = T
 
using reference = T const &
 
using pointer = T const *
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

Iteratoroperator++ ()
 
Iteratoroperator++ (int)
 
Iteratoroperator-- ()
 
Iteratoroperator-- (int)
 
Toperator* ()
 
T const & operator* () const
 
Toperator-> ()
 
T const * operator-> () const
 
bool operator== (Iterator const &rhs) const
 
bool operator!= (Iterator const &rhs) const
 

Private Member Functions

void increment ()
 
void decrement ()
 
const Tdereference () const
 
Tdereference ()
 
bool equal (const Iterator &other) const
 
 Iterator (const Accessor *accessor)
 
bool valid () const
 
void incrementToValid ()
 
void decrementToValid ()
 

Private Attributes

const Accessoraccessor_
 
threadlocal_detail::ThreadEntryNodee_
 

Friends

class Accessor
 

Detailed Description

template<class T, class Tag = void, class AccessMode = void>
class folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator

Definition at line 260 of file ThreadLocal.h.

Member Typedef Documentation

template<class T, class Tag = void, class AccessMode = void>
using folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::difference_type = ssize_t

Definition at line 314 of file ThreadLocal.h.

template<class T, class Tag = void, class AccessMode = void>
using folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::iterator_category = std::bidirectional_iterator_tag

Definition at line 318 of file ThreadLocal.h.

template<class T, class Tag = void, class AccessMode = void>
using folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::pointer = T const*

Definition at line 317 of file ThreadLocal.h.

template<class T, class Tag = void, class AccessMode = void>
using folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::reference = T const&

Definition at line 316 of file ThreadLocal.h.

template<class T, class Tag = void, class AccessMode = void>
using folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::value_type = T

Definition at line 315 of file ThreadLocal.h.

Constructor & Destructor Documentation

template<class T, class Tag = void, class AccessMode = void>
folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::Iterator ( const Accessor accessor)
inlineexplicitprivate

Member Function Documentation

template<class T, class Tag = void, class AccessMode = void>
void folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::decrement ( )
inlineprivate

Definition at line 270 of file ThreadLocal.h.

References folly::threadlocal_detail::ThreadEntryNode::getPrev().

270  {
271  e_ = e_->getPrev();
273  }
threadlocal_detail::ThreadEntryNode * e_
Definition: ThreadLocal.h:263
FOLLY_ALWAYS_INLINE ThreadEntryNode * getPrev()
template<class T, class Tag = void, class AccessMode = void>
void folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::decrementToValid ( )
inlineprivate
template<class T, class Tag = void, class AccessMode = void>
const T& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::dereference ( ) const
inlineprivate
template<class T, class Tag = void, class AccessMode = void>
T& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::dereference ( )
inlineprivate
template<class T, class Tag = void, class AccessMode = void>
bool folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::equal ( const Iterator other) const
inlineprivate
template<class T, class Tag = void, class AccessMode = void>
void folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::increment ( )
inlineprivate

Definition at line 265 of file ThreadLocal.h.

References folly::threadlocal_detail::ThreadEntryNode::getNext().

265  {
266  e_ = e_->getNext();
268  }
FOLLY_ALWAYS_INLINE ThreadEntryNode * getNext()
threadlocal_detail::ThreadEntryNode * e_
Definition: ThreadLocal.h:263
template<class T, class Tag = void, class AccessMode = void>
void folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::incrementToValid ( )
inlineprivate
template<class T, class Tag = void, class AccessMode = void>
bool folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator!= ( Iterator const &  rhs) const
inline

Definition at line 362 of file ThreadLocal.h.

362  {
363  return !equal(rhs);
364  }
FOLLY_PUSH_WARNING RHS rhs
Definition: Traits.h:649
bool equal(const Iterator &other) const
Definition: ThreadLocal.h:285
template<class T, class Tag = void, class AccessMode = void>
T& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator* ( )
inline

Definition at line 342 of file ThreadLocal.h.

References folly::gen::dereference.

342  {
343  return dereference();
344  }
template<class T, class Tag = void, class AccessMode = void>
T const& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator* ( ) const
inline

Definition at line 346 of file ThreadLocal.h.

References folly::gen::dereference.

346  {
347  return dereference();
348  }
template<class T, class Tag = void, class AccessMode = void>
Iterator& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator++ ( )
inline

Definition at line 320 of file ThreadLocal.h.

320  {
321  increment();
322  return *this;
323  }
template<class T, class Tag = void, class AccessMode = void>
Iterator& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator++ ( int  )
inline

Definition at line 325 of file ThreadLocal.h.

References folly::copy().

325  {
326  Iterator copy(*this);
327  increment();
328  return copy;
329  }
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
Iterator(const Accessor *accessor)
Definition: ThreadLocal.h:289
template<class T, class Tag = void, class AccessMode = void>
Iterator& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator-- ( )
inline

Definition at line 331 of file ThreadLocal.h.

331  {
332  decrement();
333  return *this;
334  }
template<class T, class Tag = void, class AccessMode = void>
Iterator& folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator-- ( int  )
inline

Definition at line 336 of file ThreadLocal.h.

References folly::copy().

336  {
337  Iterator copy(*this);
338  decrement();
339  return copy;
340  }
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
Iterator(const Accessor *accessor)
Definition: ThreadLocal.h:289
template<class T, class Tag = void, class AccessMode = void>
T* folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator-> ( )
inline

Definition at line 350 of file ThreadLocal.h.

References folly::gen::dereference.

350  {
351  return &dereference();
352  }
template<class T, class Tag = void, class AccessMode = void>
T const* folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator-> ( ) const
inline

Definition at line 354 of file ThreadLocal.h.

References folly::gen::dereference.

354  {
355  return &dereference();
356  }
template<class T, class Tag = void, class AccessMode = void>
bool folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::operator== ( Iterator const &  rhs) const
inline

Definition at line 358 of file ThreadLocal.h.

358  {
359  return equal(rhs);
360  }
FOLLY_PUSH_WARNING RHS rhs
Definition: Traits.h:649
bool equal(const Iterator &other) const
Definition: ThreadLocal.h:285
template<class T, class Tag = void, class AccessMode = void>
bool folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::valid ( ) const
inlineprivate

Friends And Related Function Documentation

template<class T, class Tag = void, class AccessMode = void>
friend class Accessor
friend

Definition at line 261 of file ThreadLocal.h.

Member Data Documentation

template<class T, class Tag = void, class AccessMode = void>
const Accessor* folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::accessor_
private
template<class T, class Tag = void, class AccessMode = void>
threadlocal_detail::ThreadEntryNode* folly::ThreadLocalPtr< T, Tag, AccessMode >::Accessor::Iterator::e_
private

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