proxygen
folly::detail::csl_iterator< ValT, NodeT > Class Template Reference

#include <ConcurrentSkipList-inl.h>

Inheritance diagram for folly::detail::csl_iterator< ValT, NodeT >:

Public Types

typedef ValT value_type
 
typedef value_typereference
 
typedef value_typepointer
 
typedef ptrdiff_t difference_type
 

Public Member Functions

 csl_iterator (NodeT *node=nullptr)
 
template<typename OtherVal , typename OtherNode >
 csl_iterator (const csl_iterator< OtherVal, OtherNode > &other, typename std::enable_if< std::is_convertible< OtherVal, ValT >::value >::type *=nullptr)
 
size_t nodeSize () const
 
bool good () const
 

Private Member Functions

void increment ()
 
bool equal (const csl_iterator &other) const
 
value_typedereference () const
 

Private Attributes

NodeT * node_
 

Friends

class boost::iterator_core_access
 
template<class , class >
class csl_iterator
 

Detailed Description

template<typename ValT, typename NodeT>
class folly::detail::csl_iterator< ValT, NodeT >

Definition at line 43 of file ConcurrentSkipList-inl.h.

Member Typedef Documentation

template<typename ValT, typename NodeT>
typedef ptrdiff_t folly::detail::csl_iterator< ValT, NodeT >::difference_type

Definition at line 720 of file ConcurrentSkipList.h.

template<typename ValT, typename NodeT>
typedef value_type* folly::detail::csl_iterator< ValT, NodeT >::pointer

Definition at line 719 of file ConcurrentSkipList.h.

template<typename ValT, typename NodeT>
typedef value_type& folly::detail::csl_iterator< ValT, NodeT >::reference

Definition at line 718 of file ConcurrentSkipList.h.

template<typename ValT, typename NodeT>
typedef ValT folly::detail::csl_iterator< ValT, NodeT >::value_type

Definition at line 717 of file ConcurrentSkipList.h.

Constructor & Destructor Documentation

template<typename ValT, typename NodeT>
folly::detail::csl_iterator< ValT, NodeT >::csl_iterator ( NodeT *  node = nullptr)
inlineexplicit

Definition at line 722 of file ConcurrentSkipList.h.

722 : node_(node) {}
template<typename ValT, typename NodeT>
template<typename OtherVal , typename OtherNode >
folly::detail::csl_iterator< ValT, NodeT >::csl_iterator ( const csl_iterator< OtherVal, OtherNode > &  other,
typename std::enable_if< std::is_convertible< OtherVal, ValT >::value >::type = nullptr 
)
inline

Definition at line 725 of file ConcurrentSkipList.h.

729  : node_(other.node_) {}

Member Function Documentation

template<typename ValT, typename NodeT>
value_type& folly::detail::csl_iterator< ValT, NodeT >::dereference ( ) const
inlineprivate

Definition at line 751 of file ConcurrentSkipList.h.

751  {
752  return node_->data();
753  }
template<typename ValT, typename NodeT>
bool folly::detail::csl_iterator< ValT, NodeT >::equal ( const csl_iterator< ValT, NodeT > &  other) const
inlineprivate

Definition at line 748 of file ConcurrentSkipList.h.

References folly::detail::csl_iterator< ValT, NodeT >::node_.

748  {
749  return node_ == other.node_;
750  }
template<typename ValT, typename NodeT>
bool folly::detail::csl_iterator< ValT, NodeT >::good ( ) const
inline

Definition at line 736 of file ConcurrentSkipList.h.

736  {
737  return node_ != nullptr;
738  }
template<typename ValT, typename NodeT>
void folly::detail::csl_iterator< ValT, NodeT >::increment ( )
inlineprivate

Definition at line 745 of file ConcurrentSkipList.h.

745  {
746  node_ = node_->next();
747  }
template<typename ValT, typename NodeT>
size_t folly::detail::csl_iterator< ValT, NodeT >::nodeSize ( ) const
inline

Definition at line 731 of file ConcurrentSkipList.h.

731  {
732  return node_ == nullptr ? 0
733  : node_->height() * sizeof(NodeT*) + sizeof(*this);
734  }

Friends And Related Function Documentation

template<typename ValT, typename NodeT>
friend class boost::iterator_core_access
friend

Definition at line 741 of file ConcurrentSkipList.h.

template<typename ValT, typename NodeT>
template<class , class >
friend class csl_iterator
friend

Definition at line 743 of file ConcurrentSkipList.h.

Member Data Documentation

template<typename ValT, typename NodeT>
NodeT* folly::detail::csl_iterator< ValT, NodeT >::node_
private

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