MySQL 8.4.2
Source Code Documentation
mysql_harness::Range< Iter > Class Template Reference

Convenience class for handling iterator range. More...

#include <config_parser.h>

Public Types

using value_type = typename Iter::value_type
 
using reference = typename Iter::reference
 
using iterator = Iter
 
using const_iterator = iterator
 
using difference_type = typename std::iterator_traits< Iter >::difference_type
 
using size_type = difference_type
 

Public Member Functions

 Range (Iter start, Iter finish)
 
Iter begin () const
 Get iterator to beginning of range. More...
 
Iter end () const
 Get iterator to end of range. More...
 
bool empty () const
 Check if range is empty. More...
 
size_type size () const
 Get size of the range, that is, number of elements in the range. More...
 

Private Attributes

Iter begin_
 
Iter end_
 

Detailed Description

template<class Iter>
class mysql_harness::Range< Iter >

Convenience class for handling iterator range.

This is a template class that accept a pair of iterators and implement the necessary methods to be able to be used as a sequence container.

Member Typedef Documentation

◆ const_iterator

template<class Iter >
using mysql_harness::Range< Iter >::const_iterator = iterator

◆ difference_type

template<class Iter >
using mysql_harness::Range< Iter >::difference_type = typename std::iterator_traits<Iter>::difference_type

◆ iterator

template<class Iter >
using mysql_harness::Range< Iter >::iterator = Iter

◆ reference

template<class Iter >
using mysql_harness::Range< Iter >::reference = typename Iter::reference

◆ size_type

template<class Iter >
using mysql_harness::Range< Iter >::size_type = difference_type

◆ value_type

template<class Iter >
using mysql_harness::Range< Iter >::value_type = typename Iter::value_type

Constructor & Destructor Documentation

◆ Range()

template<class Iter >
mysql_harness::Range< Iter >::Range ( Iter  start,
Iter  finish 
)
inline

Member Function Documentation

◆ begin()

template<class Iter >
Iter mysql_harness::Range< Iter >::begin ( ) const
inline

Get iterator to beginning of range.

◆ empty()

template<class Iter >
bool mysql_harness::Range< Iter >::empty ( ) const
inline

Check if range is empty.

◆ end()

template<class Iter >
Iter mysql_harness::Range< Iter >::end ( ) const
inline

Get iterator to end of range.

◆ size()

template<class Iter >
size_type mysql_harness::Range< Iter >::size ( ) const
inline

Get size of the range, that is, number of elements in the range.

Note
This call std::distance internally.
Returns
The number of elements in the range.

Member Data Documentation

◆ begin_

template<class Iter >
Iter mysql_harness::Range< Iter >::begin_
private

◆ end_

template<class Iter >
Iter mysql_harness::Range< Iter >::end_
private

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