MySQL 8.3.0
Source Code Documentation
Ha_trx_info_list::Iterator Class Reference

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
 
Iteratoroperator= (const Iterator &rhs)
 
Iteratoroperator++ ()
 
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

Iteratorset_next ()
 

Private Attributes

Ha_trx_infom_current {nullptr}
 Item this iterator is currently pointing to
More...
 
Ha_trx_infom_next {nullptr}
 Next item in the list
More...
 

Detailed Description

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.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

using Ha_trx_info_list::Iterator::iterator_category = std::forward_iterator_tag

◆ pointer

◆ reference

Constructor & Destructor Documentation

◆ Iterator() [1/3]

Ha_trx_info_list::Iterator::Iterator ( Ha_trx_info parent)

◆ Iterator() [2/3]

Ha_trx_info_list::Iterator::Iterator ( std::nullptr_t  )

◆ Iterator() [3/3]

Ha_trx_info_list::Iterator::Iterator ( Iterator const &  rhs)

◆ ~Iterator()

virtual Ha_trx_info_list::Iterator::~Iterator ( )
virtualdefault

Member Function Documentation

◆ operator!=() [1/3]

bool Ha_trx_info_list::Iterator::operator!= ( Ha_trx_info const &  rhs) const

◆ operator!=() [2/3]

bool Ha_trx_info_list::Iterator::operator!= ( Ha_trx_info const *  rhs) const

◆ operator!=() [3/3]

bool Ha_trx_info_list::Iterator::operator!= ( Iterator const &  rhs) const

◆ operator*()

Ha_trx_info_list::Iterator::reference Ha_trx_info_list::Iterator::operator* ( ) const

◆ operator++() [1/2]

Ha_trx_info_list::Iterator & Ha_trx_info_list::Iterator::operator++ ( )

◆ operator++() [2/2]

Ha_trx_info_list::Iterator Ha_trx_info_list::Iterator::operator++ ( int  )

◆ operator->()

Ha_trx_info_list::Iterator::pointer Ha_trx_info_list::Iterator::operator-> ( ) const

◆ operator=()

Ha_trx_info_list::Iterator & Ha_trx_info_list::Iterator::operator= ( const Iterator rhs)

◆ operator==() [1/3]

bool Ha_trx_info_list::Iterator::operator== ( Ha_trx_info const &  rhs) const

◆ operator==() [2/3]

bool Ha_trx_info_list::Iterator::operator== ( Ha_trx_info const *  rhs) const

◆ operator==() [3/3]

bool Ha_trx_info_list::Iterator::operator== ( Iterator const &  rhs) const

◆ set_next()

Ha_trx_info_list::Iterator & Ha_trx_info_list::Iterator::set_next ( )
private

Member Data Documentation

◆ m_current

Ha_trx_info* Ha_trx_info_list::Iterator::m_current {nullptr}
private

Item this iterator is currently pointing to

◆ m_next

Ha_trx_info* Ha_trx_info_list::Iterator::m_next {nullptr}
private

Next item in the list


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