MySQL 9.6.0
Source Code Documentation
mysql::sets::detail::Interval_base< Set_traits_tp > Class Template Reference

Holds the start boundary and endpoint boundary of an interval. More...

#include <interval.h>

Inheritance diagram for mysql::sets::detail::Interval_base< Set_traits_tp >:
[legend]

Public Types

using Set_traits_t = Set_traits_tp
 
using Element_t = Set_traits_t::Element_t
 

Public Member Functions

constexpr const Element_tstart () const
 Return const reference to the starting point of the interval (inclusive). More...
 
constexpr const Element_texclusive_end () const
 Return const reference to the exclusive endpoint of the interval. More...
 

Protected Member Functions

constexpr Interval_base ()
 This is enabled if Set_traits_t are discrete set traits. More...
 
constexpr Interval_base (const Element_t &start, const Element_t &exclusive_end)
 Construct an interval with the given inclusive start and exclusive end. More...
 
constexpr Interval_base (Element_t singleton)
 Construct a singleton interval. More...
 
void assign (const Element_t &start_arg, const Element_t &exclusive_end_arg)
 Set both boundaries to the given values, without validating the range. More...
 
void set_start (Element_t start_arg)
 Set the value for the start boundary, without validating the range. More...
 
void set_exclusive_end (Element_t exclusive_end_arg)
 Set the value for the exclusive_end boundary, without validating the range. More...
 

Private Attributes

Element_t m_values [2]
 The start boundary at index 0, the exclusive end boundary at index 1. More...
 

Detailed Description

template<Is_bounded_set_traits Set_traits_tp>
class mysql::sets::detail::Interval_base< Set_traits_tp >

Holds the start boundary and endpoint boundary of an interval.

The endpoint is always exclusive.

This base class stores the two values and provides getters, but has all setter functions protected. The protected setter functions do not check that values are in order or in range.

Template Parameters
Set_traits_tpBounded set traits describing properties of the element type.

Member Typedef Documentation

◆ Element_t

template<Is_bounded_set_traits Set_traits_tp>
using mysql::sets::detail::Interval_base< Set_traits_tp >::Element_t = Set_traits_t::Element_t

◆ Set_traits_t

template<Is_bounded_set_traits Set_traits_tp>
using mysql::sets::detail::Interval_base< Set_traits_tp >::Set_traits_t = Set_traits_tp

Constructor & Destructor Documentation

◆ Interval_base() [1/3]

template<Is_bounded_set_traits Set_traits_tp>
constexpr mysql::sets::detail::Interval_base< Set_traits_tp >::Interval_base ( )
inlineconstexprprotected

This is enabled if Set_traits_t are discrete set traits.

◆ Interval_base() [2/3]

template<Is_bounded_set_traits Set_traits_tp>
constexpr mysql::sets::detail::Interval_base< Set_traits_tp >::Interval_base ( const Element_t start,
const Element_t exclusive_end 
)
inlineconstexprprotected

Construct an interval with the given inclusive start and exclusive end.

◆ Interval_base() [3/3]

template<Is_bounded_set_traits Set_traits_tp>
constexpr mysql::sets::detail::Interval_base< Set_traits_tp >::Interval_base ( Element_t  singleton)
inlineexplicitconstexprprotected

Construct a singleton interval.

This is enabled if Set_traits_t are discrete set traits.

Member Function Documentation

◆ assign()

template<Is_bounded_set_traits Set_traits_tp>
void mysql::sets::detail::Interval_base< Set_traits_tp >::assign ( const Element_t start_arg,
const Element_t exclusive_end_arg 
)
inlineprotected

Set both boundaries to the given values, without validating the range.

Parameters
start_argThe new value for the start boundary.
exclusive_end_argThe new value for the exclusive_end boundary.

◆ exclusive_end()

template<Is_bounded_set_traits Set_traits_tp>
constexpr const Element_t & mysql::sets::detail::Interval_base< Set_traits_tp >::exclusive_end ( ) const
inlineconstexpr

Return const reference to the exclusive endpoint of the interval.

◆ set_exclusive_end()

template<Is_bounded_set_traits Set_traits_tp>
void mysql::sets::detail::Interval_base< Set_traits_tp >::set_exclusive_end ( Element_t  exclusive_end_arg)
inlineprotected

Set the value for the exclusive_end boundary, without validating the range.

Parameters
exclusive_end_argThe new value for the exclusive_end boundary.

◆ set_start()

template<Is_bounded_set_traits Set_traits_tp>
void mysql::sets::detail::Interval_base< Set_traits_tp >::set_start ( Element_t  start_arg)
inlineprotected

Set the value for the start boundary, without validating the range.

Parameters
start_argThe new value for the start boundary.

◆ start()

template<Is_bounded_set_traits Set_traits_tp>
constexpr const Element_t & mysql::sets::detail::Interval_base< Set_traits_tp >::start ( ) const
inlineconstexpr

Return const reference to the starting point of the interval (inclusive).

Member Data Documentation

◆ m_values

template<Is_bounded_set_traits Set_traits_tp>
Element_t mysql::sets::detail::Interval_base< Set_traits_tp >::m_values[2]
private

The start boundary at index 0, the exclusive end boundary at index 1.


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