MySQL 9.6.0
Source Code Documentation
mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp > Class Template Reference

Helper class to hold lookup tables indexed by ascii characters. More...

#include <tag.h>

Public Types

using Transform_t = Transform_tp
 
using Element_t = std::invoke_result_t< Transform_t, unsigned char >
 
using Table_t = std::array< Element_t, 256 >
 

Static Public Member Functions

static Table_ttable ()
 Return reference to the table. More...
 

Static Private Member Functions

static Table_tbuild_table (std::initializer_list< unsigned char > char_ranges)
 Compute the table. More...
 

Detailed Description

template<std::invocable< unsigned char > Transform_tp, unsigned char... char_ranges_tp>
requires (sizeof...(char_ranges_tp) % 2 == 0)
class mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp >

Helper class to hold lookup tables indexed by ascii characters.

Template Parameters
Transform_tpFunction that transforms letters. It should accept a char argument and return the type of values stored in the table.
char_ranges_tpAn even number of char constants, each pair defining the beginning and end of a range of characters included in the table. Both beginning and end are inclusive.

Member Typedef Documentation

◆ Element_t

template<std::invocable< unsigned char > Transform_tp, unsigned char... char_ranges_tp>
using mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp >::Element_t = std::invoke_result_t<Transform_t, unsigned char>

◆ Table_t

template<std::invocable< unsigned char > Transform_tp, unsigned char... char_ranges_tp>
using mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp >::Table_t = std::array<Element_t, 256>

◆ Transform_t

template<std::invocable< unsigned char > Transform_tp, unsigned char... char_ranges_tp>
using mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp >::Transform_t = Transform_tp

Member Function Documentation

◆ build_table()

template<std::invocable< unsigned char > Transform_tp, unsigned char... char_ranges_tp>
static Table_t & mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp >::build_table ( std::initializer_list< unsigned char >  char_ranges)
inlinestaticprivate

Compute the table.

◆ table()

template<std::invocable< unsigned char > Transform_tp, unsigned char... char_ranges_tp>
static Table_t & mysql::gtids::detail::Char_table< Transform_tp, char_ranges_tp >::table ( )
inlinestatic

Return reference to the table.


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