MySQL 8.0.31
Source Code Documentation
Table_columns_view< ExclusionFilter >::iterator Class Reference

Iterator class to allow iterating over the replicatable fields in a TABLE object field set. More...

#include <table_column_iterator.h>

Public Types

using difference_type = std::ptrdiff_t
 
using value_type = Field *
 
using pointer = Field *
 
using reference = Field *
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

 iterator (Table_columns_view &parent, long pos, long col)
 Constructor for the iterator. More...
 
 iterator (const iterator &rhs)
 Copy constructor. More...
 
virtual ~iterator ()=default
 Default destructor. More...
 
iteratoroperator= (const iterator &rhs)
 
iteratoroperator++ ()
 
reference operator* () const
 
iterator operator++ (int)
 
pointer operator-> () const
 
bool operator== (iterator rhs) const
 
bool operator!= (iterator rhs) const
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
size_t absolute_pos ()
 Returns the position this iterator object is pointing to, within the local table field set. More...
 
size_t filtered_pos ()
 Returns the position this iterator object is pointing to, within the replicated table field set. More...
 

Private Attributes

Table_columns_view const * m_parent
 A reference to the instance we wish to iterate over. More...
 
long m_absolute_pos
 The position, relative to the TABLE object, this instance iterator is pointing to. More...
 
long m_filtered_pos
 The position, relative to the set of included fields, this instance iterator is pointing to. More...
 

Friends

struct TABLE
 
class Table_columns_view
 

Detailed Description

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
class Table_columns_view< ExclusionFilter >::iterator

Iterator class to allow iterating over the replicatable fields in a TABLE object field set.

It implements the bidirectional iterator concept.

In order to fully understand this class implementation, please, check the documentation on the Iterator concept requirements within the C++ standard and the STL definition.

Member Typedef Documentation

◆ difference_type

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
using Table_columns_view< ExclusionFilter >::iterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
using Table_columns_view< ExclusionFilter >::iterator::iterator_category = std::bidirectional_iterator_tag

◆ pointer

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
using Table_columns_view< ExclusionFilter >::iterator::pointer = Field *

◆ reference

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
using Table_columns_view< ExclusionFilter >::iterator::reference = Field *

◆ value_type

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
using Table_columns_view< ExclusionFilter >::iterator::value_type = Field *

Constructor & Destructor Documentation

◆ iterator() [1/2]

template<typename F >
Table_columns_view< F >::iterator::iterator ( Table_columns_view parent,
long  pos,
long  col 
)
explicit

Constructor for the iterator.

It takes the parent Table_columns_view object and the initial positions for the replicated table and for the local table.

Parameters
parentreference to the target Table_columns_view object.
posinitial replicated table field set position.
colinitial local table field set position.

◆ iterator() [2/2]

template<typename F >
Table_columns_view< F >::iterator::iterator ( const iterator rhs)

Copy constructor.

Parameters
rhsobject instance we pretend to copy from.

◆ ~iterator()

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
virtual Table_columns_view< ExclusionFilter >::iterator::~iterator ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ absolute_pos()

template<typename F >
size_t Table_columns_view< F >::iterator::absolute_pos

Returns the position this iterator object is pointing to, within the local table field set.

Returns
the position this object is pointing to, within the local table field set.

◆ filtered_pos()

template<typename F >
size_t Table_columns_view< F >::iterator::filtered_pos

Returns the position this iterator object is pointing to, within the replicated table field set.

Returns
the position this object is pointing to, within the replicated table field set.

◆ operator!=()

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
bool Table_columns_view< F >::iterator::operator!= ( iterator  rhs) const

◆ operator*()

template<typename F >
Table_columns_view< F >::iterator::reference Table_columns_view< F >::iterator::operator*

◆ operator++() [1/2]

template<typename F >
Table_columns_view< F >::iterator & Table_columns_view< F >::iterator::operator++

◆ operator++() [2/2]

template<typename F >
Table_columns_view< F >::iterator Table_columns_view< F >::iterator::operator++ ( int  )

◆ operator--() [1/2]

template<typename F >
Table_columns_view< F >::iterator & Table_columns_view< F >::iterator::operator--

◆ operator--() [2/2]

template<typename F >
Table_columns_view< F >::iterator Table_columns_view< F >::iterator::operator-- ( int  )

◆ operator->()

template<typename F >
Table_columns_view< F >::iterator::pointer Table_columns_view< F >::iterator::operator->

◆ operator=()

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
Table_columns_view< F >::iterator & Table_columns_view< F >::iterator::operator= ( const iterator rhs)

◆ operator==()

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
bool Table_columns_view< F >::iterator::operator== ( iterator  rhs) const

Friends And Related Function Documentation

◆ TABLE

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
friend struct TABLE
friend

◆ Table_columns_view

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
friend class Table_columns_view
friend

Member Data Documentation

◆ m_absolute_pos

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
long Table_columns_view< ExclusionFilter >::iterator::m_absolute_pos
private

The position, relative to the TABLE object, this instance iterator is pointing to.

◆ m_filtered_pos

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
long Table_columns_view< ExclusionFilter >::iterator::m_filtered_pos
private

The position, relative to the set of included fields, this instance iterator is pointing to.

◆ m_parent

template<typename ExclusionFilter = std::function<bool(TABLE const *, size_t)>>
Table_columns_view const* Table_columns_view< ExclusionFilter >::iterator::m_parent
private

A reference to the instance we wish to iterate over.


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