MySQL 9.6.0
Source Code Documentation
mysql::strconv::detail::Repeat_base< Repeat_optional_t > Class Template Reference

Common base class for the Repeat and Repeat_optional classes, providing functionality for representing the upper bound on the number of repetitions. More...

#include <repeat.h>

Public Member Functions

 Repeat_base (std::integral auto max)
 Construct a new object with the given maximum. More...
 
std::size_t max () const
 Return the maximum number of repetitions, inclusive. More...
 

Static Public Member Functions

static Repeat_optional_t optional ()
 Return a Repeat_optional object representing zero or one instances. More...
 
static Repeat_optional_t at_most (std::integral auto max_arg)
 Return a Repeat object representing between 0 and min_arg repetitions. More...
 
static Repeat_optional_t any ()
 Return a Repeat_optional object representing any number of repetitions from 0 and up (bounded only by std::numeric_limits). More...
 

Private Attributes

std::size_t m_max
 The maximum number of repetitions, inclusive. More...
 

Detailed Description

template<class Repeat_optional_t>
class mysql::strconv::detail::Repeat_base< Repeat_optional_t >

Common base class for the Repeat and Repeat_optional classes, providing functionality for representing the upper bound on the number of repetitions.

Provides a constructor that takes an integral value for the upper bound on the number of repetitions, as well as several static factory functions for creating Repeat_optional objects with specific repetition ranges.

Constructor & Destructor Documentation

◆ Repeat_base()

template<class Repeat_optional_t >
mysql::strconv::detail::Repeat_base< Repeat_optional_t >::Repeat_base ( std::integral auto  max)
inlineexplicit

Construct a new object with the given maximum.

Member Function Documentation

◆ any()

template<class Repeat_optional_t >
static Repeat_optional_t mysql::strconv::detail::Repeat_base< Repeat_optional_t >::any ( )
inlinestatic

Return a Repeat_optional object representing any number of repetitions from 0 and up (bounded only by std::numeric_limits).

◆ at_most()

template<class Repeat_optional_t >
static Repeat_optional_t mysql::strconv::detail::Repeat_base< Repeat_optional_t >::at_most ( std::integral auto  max_arg)
inlinestatic

Return a Repeat object representing between 0 and min_arg repetitions.

◆ max()

template<class Repeat_optional_t >
std::size_t mysql::strconv::detail::Repeat_base< Repeat_optional_t >::max ( ) const
inline

Return the maximum number of repetitions, inclusive.

◆ optional()

template<class Repeat_optional_t >
static Repeat_optional_t mysql::strconv::detail::Repeat_base< Repeat_optional_t >::optional ( )
inlinestatic

Return a Repeat_optional object representing zero or one instances.

Member Data Documentation

◆ m_max

template<class Repeat_optional_t >
std::size_t mysql::strconv::detail::Repeat_base< Repeat_optional_t >::m_max
private

The maximum number of repetitions, inclusive.


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