Bitcoin Core 28.99.0
P2P Digital Currency
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
bitdeque< BITS_PER_WORD >::Iterator< Const > Class Template Reference

Iterator to a bitdeque element, const or not. More...

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = bool
 
using pointer = void
 
using const_pointer = void
 
using reference = std::conditional_t< Const, bool, typename word_type::reference >
 
using const_reference = bool
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 Iterator ()=default
 Default constructor. More...
 
 Iterator (const Iterator &)=default
 Default copy constructor. More...
 
template<bool ConstArg = Const, typename = std::enable_if_t<Const && ConstArg>>
 Iterator (const Iterator< false > &x)
 Conversion from non-const to const iterator. More...
 
Iteratoroperator+= (difference_type dist)
 
Iteratoroperator= (const Iterator &)=default
 
Iteratoroperator-= (difference_type dist)
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator-- ()
 
Iterator operator-- (int)
 
reference operator* () const
 
reference operator[] (difference_type pos) const
 

Private Types

using deque_iterator = std::conditional_t< Const, typename deque_type::const_iterator, typename deque_type::iterator >
 

Private Member Functions

 Iterator (const deque_iterator &it, int bitpos)
 

Private Attributes

deque_iterator m_it
 
int m_bitpos {0}
 

Friends

class bitdeque
 
difference_type operator- (const Iterator &x, const Iterator &y)
 
Iterator operator+ (Iterator x, difference_type dist)
 
Iterator operator+ (difference_type dist, Iterator x)
 
Iterator operator- (Iterator x, difference_type dist)
 
bool operator< (const Iterator &x, const Iterator &y)
 
bool operator> (const Iterator &x, const Iterator &y)
 
bool operator<= (const Iterator &x, const Iterator &y)
 
bool operator>= (const Iterator &x, const Iterator &y)
 
bool operator== (const Iterator &x, const Iterator &y)
 
bool operator!= (const Iterator &x, const Iterator &y)
 

Detailed Description

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
class bitdeque< BITS_PER_WORD >::Iterator< Const >

Iterator to a bitdeque element, const or not.

Definition at line 35 of file bitdeque.h.

Member Typedef Documentation

◆ const_pointer

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::const_pointer = void

Definition at line 48 of file bitdeque.h.

◆ const_reference

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::const_reference = bool

Definition at line 50 of file bitdeque.h.

◆ deque_iterator

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::deque_iterator = std::conditional_t<Const, typename deque_type::const_iterator, typename deque_type::iterator>
private

Definition at line 37 of file bitdeque.h.

◆ difference_type

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::difference_type = std::ptrdiff_t

Definition at line 51 of file bitdeque.h.

◆ iterator_category

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::iterator_category = std::random_access_iterator_tag

Definition at line 45 of file bitdeque.h.

◆ pointer

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::pointer = void

Definition at line 47 of file bitdeque.h.

◆ reference

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::reference = std::conditional_t<Const, bool, typename word_type::reference>

Definition at line 49 of file bitdeque.h.

◆ value_type

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
using bitdeque< BITS_PER_WORD >::Iterator< Const >::value_type = bool

Definition at line 46 of file bitdeque.h.

Constructor & Destructor Documentation

◆ Iterator() [1/4]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bitdeque< BITS_PER_WORD >::Iterator< Const >::Iterator ( const deque_iterator it,
int  bitpos 
)
inlineprivate

Definition at line 41 of file bitdeque.h.

◆ Iterator() [2/4]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bitdeque< BITS_PER_WORD >::Iterator< Const >::Iterator ( )
default

Default constructor.

◆ Iterator() [3/4]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bitdeque< BITS_PER_WORD >::Iterator< Const >::Iterator ( const Iterator< Const > &  )
default

Default copy constructor.

◆ Iterator() [4/4]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
template<bool ConstArg = Const, typename = std::enable_if_t<Const && ConstArg>>
bitdeque< BITS_PER_WORD >::Iterator< Const >::Iterator ( const Iterator< false > &  x)
inline

Conversion from non-const to const iterator.

Definition at line 61 of file bitdeque.h.

Member Function Documentation

◆ operator*()

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
reference bitdeque< BITS_PER_WORD >::Iterator< Const >::operator* ( ) const
inline

Definition at line 108 of file bitdeque.h.

◆ operator++() [1/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator & bitdeque< BITS_PER_WORD >::Iterator< Const >::operator++ ( )
inline

Definition at line 95 of file bitdeque.h.

◆ operator++() [2/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator bitdeque< BITS_PER_WORD >::Iterator< Const >::operator++ ( int  )
inline

Definition at line 96 of file bitdeque.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+=()

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator & bitdeque< BITS_PER_WORD >::Iterator< Const >::operator+= ( difference_type  dist)
inline

Definition at line 63 of file bitdeque.h.

Here is the caller graph for this function:

◆ operator--() [1/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator & bitdeque< BITS_PER_WORD >::Iterator< Const >::operator-- ( )
inline

Definition at line 97 of file bitdeque.h.

◆ operator--() [2/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator bitdeque< BITS_PER_WORD >::Iterator< Const >::operator-- ( int  )
inline

Definition at line 98 of file bitdeque.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator-=()

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator & bitdeque< BITS_PER_WORD >::Iterator< Const >::operator-= ( difference_type  dist)
inline

Definition at line 94 of file bitdeque.h.

Here is the call graph for this function:

◆ operator=()

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator & bitdeque< BITS_PER_WORD >::Iterator< Const >::operator= ( const Iterator< Const > &  )
default

◆ operator[]()

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
reference bitdeque< BITS_PER_WORD >::Iterator< Const >::operator[] ( difference_type  pos) const
inline

Definition at line 109 of file bitdeque.h.

Friends And Related Function Documentation

◆ bitdeque

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
friend class bitdeque
friend

Definition at line 42 of file bitdeque.h.

◆ operator!=

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bool operator!= ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 107 of file bitdeque.h.

◆ operator+ [1/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator operator+ ( difference_type  dist,
Iterator< Const >  x 
)
friend

Definition at line 100 of file bitdeque.h.

◆ operator+ [2/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator operator+ ( Iterator< Const >  x,
difference_type  dist 
)
friend

Definition at line 99 of file bitdeque.h.

◆ operator- [1/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
difference_type operator- ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 88 of file bitdeque.h.

◆ operator- [2/2]

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
Iterator operator- ( Iterator< Const >  x,
difference_type  dist 
)
friend

Definition at line 101 of file bitdeque.h.

◆ operator<

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bool operator< ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 102 of file bitdeque.h.

◆ operator<=

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bool operator<= ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 104 of file bitdeque.h.

◆ operator==

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bool operator== ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 106 of file bitdeque.h.

◆ operator>

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bool operator> ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 103 of file bitdeque.h.

◆ operator>=

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
bool operator>= ( const Iterator< Const > &  x,
const Iterator< Const > &  y 
)
friend

Definition at line 105 of file bitdeque.h.

Member Data Documentation

◆ m_bitpos

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
int bitdeque< BITS_PER_WORD >::Iterator< Const >::m_bitpos {0}
private

Definition at line 40 of file bitdeque.h.

◆ m_it

template<int BITS_PER_WORD = 4096 * 8>
template<bool Const>
deque_iterator bitdeque< BITS_PER_WORD >::Iterator< Const >::m_it
private

Definition at line 39 of file bitdeque.h.


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