MySQL 9.6.0
Source Code Documentation
mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp > Class Template Reference

CRTP base class / mixin used to define ranges that provide Transform_iterators. More...

#include <transform_view.h>

Inheritance diagram for mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >:
[legend]

Public Types

using Source_t = Source_tp
 
using Transform_t = Transform_tp
 
using Iterator_t = Transform_iterator< Transform_tp, mysql::ranges::Range_iterator_type< Source_t > >
 

Public Member Functions

auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 
auto size () const
 
auto empty () const
 
- Public Member Functions inherited from mysql::ranges::Collection_interface< Transform_interface< Self_tp, Transform_tp, Source_tp > >
constexpr auto cbegin () const
 Return constant iterator to the beginning. More...
 
constexpr auto cend () const
 Return constant iterator to the end. More...
 
constexpr auto rbegin ()
 Return reverse iterator to the beginning. More...
 
constexpr auto rbegin () const
 Return const reverse iterator to the beginning. More...
 
constexpr auto rend ()
 Return reverse iterator to the end. More...
 
constexpr auto rend () const
 Return const reverse iterator to the end. More...
 
constexpr auto crbegin () const
 Return const reverse iterator to the beginning. More...
 
constexpr auto crend () const
 Return const reverse iterator to the end. More...
 
constexpr bool empty () const
 Return true if the range is empty, i.e., begin() == end(). More...
 
constexpr operator bool () const
 Return true if the range is non-empty, i.e., begin() != end(). More...
 
constexpr bool operator! () const
 Return true if the range is empty, i.e., begin() == end(). More...
 
constexpr auto size () const
 Return the number of elements in this view, unsigned (size_t), by computing std::ranges::distance(begin, end) More...
 
constexpr auto ssize () const
 Return the number of elements in this view, signed (ptrdiff_t). More...
 
constexpr decltype(auto) front () const
 Return the first element. More...
 
constexpr decltype(auto) back () const
 Return the last element. Enabled if we have bidirectional iterators. More...
 
constexpr decltype(auto) operator[] (std::ptrdiff_t n)
 Return the n'th element, possibly mutable. More...
 
constexpr decltype(auto) operator[] (std::ptrdiff_t n) const
 Return the n'th element, const. More...
 
constexpr auto * data ()
 Return pointer to underlying contiguous memory. More...
 
constexpr auto * data () const
 Return const pointer to underlying contiguous memory. More...
 

Private Member Functions

const auto & source () const
 
auto & source ()
 

Detailed Description

template<class Self_tp, class Transform_tp, std::ranges::range Source_tp>
class mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >

CRTP base class / mixin used to define ranges that provide Transform_iterators.

This is for objects that own the source. If you need objects that do not own the source - a view - use Transform_view.

Template Parameters
Self_tpDerived class. This must implement the member function transform_source() which returns a source object whose iterators return tuple-like objects.
Transform_tpThe transform.
Source_tpThe source type.

Member Typedef Documentation

◆ Iterator_t

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
using mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::Iterator_t = Transform_iterator<Transform_tp, mysql::ranges::Range_iterator_type<Source_t> >

◆ Source_t

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
using mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::Source_t = Source_tp

◆ Transform_t

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
using mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::Transform_t = Transform_tp

Member Function Documentation

◆ begin() [1/2]

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::begin ( )
inline

◆ begin() [2/2]

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::begin ( ) const
inline

◆ empty()

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::empty ( ) const
inline

◆ end() [1/2]

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::end ( )
inline

◆ end() [2/2]

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::end ( ) const
inline

◆ size()

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::size ( ) const
inline

◆ source() [1/2]

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
auto & mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::source ( )
inlineprivate

◆ source() [2/2]

template<class Self_tp , class Transform_tp , std::ranges::range Source_tp>
const auto & mysql::ranges::Transform_interface< Self_tp, Transform_tp, Source_tp >::source ( ) const
inlineprivate

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