MySQL 9.1.0
Source Code Documentation
|
Implements a forward iterator for Ha_trx_info_list
.
More...
#include <transaction_info.h>
Public Types | |
using | difference_type = std::ptrdiff_t |
using | pointer = Ha_trx_info * |
using | reference = Ha_trx_info & |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
Iterator (Ha_trx_info *parent) | |
Iterator (std::nullptr_t) | |
Iterator (Iterator const &rhs) | |
virtual | ~Iterator ()=default |
Iterator & | operator= (const Iterator &rhs) |
Iterator & | operator++ () |
reference | operator* () const |
Iterator | operator++ (int) |
pointer | operator-> () const |
bool | operator== (Iterator const &rhs) const |
bool | operator== (Ha_trx_info const *rhs) const |
bool | operator== (Ha_trx_info const &rhs) const |
bool | operator!= (Iterator const &rhs) const |
bool | operator!= (Ha_trx_info const *rhs) const |
bool | operator!= (Ha_trx_info const &rhs) const |
Private Member Functions | |
Iterator & | set_next () |
Private Attributes | |
Ha_trx_info * | m_current {nullptr} |
Item this iterator is currently pointing to More... | |
Ha_trx_info * | m_next {nullptr} |
Next item in the list More... | |
Implements a forward iterator for Ha_trx_info_list
.
The Ha_trx_info_list
methods begin
and end
complete the requirements for algorithms usage.
Since the container this iterator targets is a linked-list where the list and the list elements are the same, the invalidation rules are not the ones usually encontered in iterator classes. Invoking Ha_trx_info::reset()
, which clears the pointer to next element in the list, doesn't invalidate the iterator, instead the pointer reference is kept by the iterator in order to allow the requirements for forward iterating to be valid. Therefore, although Ha_trx_info::reset()
removes the element from the list, the iterator is no invalidated and iteration over the rest of the element is kept.
using Ha_trx_info_list::Iterator::difference_type = std::ptrdiff_t |
using Ha_trx_info_list::Iterator::iterator_category = std::forward_iterator_tag |
Ha_trx_info_list::Iterator::Iterator | ( | Ha_trx_info * | parent | ) |
Ha_trx_info_list::Iterator::Iterator | ( | std::nullptr_t | ) |
Ha_trx_info_list::Iterator::Iterator | ( | Iterator const & | rhs | ) |
|
virtualdefault |
bool Ha_trx_info_list::Iterator::operator!= | ( | Ha_trx_info const & | rhs | ) | const |
bool Ha_trx_info_list::Iterator::operator!= | ( | Ha_trx_info const * | rhs | ) | const |
bool Ha_trx_info_list::Iterator::operator!= | ( | Iterator const & | rhs | ) | const |
Ha_trx_info_list::Iterator::reference Ha_trx_info_list::Iterator::operator* | ( | ) | const |
Ha_trx_info_list::Iterator & Ha_trx_info_list::Iterator::operator++ | ( | ) |
Ha_trx_info_list::Iterator Ha_trx_info_list::Iterator::operator++ | ( | int | ) |
Ha_trx_info_list::Iterator::pointer Ha_trx_info_list::Iterator::operator-> | ( | ) | const |
Ha_trx_info_list::Iterator & Ha_trx_info_list::Iterator::operator= | ( | const Iterator & | rhs | ) |
bool Ha_trx_info_list::Iterator::operator== | ( | Ha_trx_info const & | rhs | ) | const |
bool Ha_trx_info_list::Iterator::operator== | ( | Ha_trx_info const * | rhs | ) | const |
bool Ha_trx_info_list::Iterator::operator== | ( | Iterator const & | rhs | ) | const |
|
private |
|
private |
Item this iterator is currently pointing to
|
private |
Next item in the list