MySQL 9.6.0
Source Code Documentation
mysql::strconv::Hex_format< hex_case_tp > Struct Template Reference

Format tag to identify hex format when encoding and decoding strings. More...

#include <hex_format.h>

Inheritance diagram for mysql::strconv::Hex_format< hex_case_tp >:
[legend]

Public Member Functions

 Hex_format ()=default
 Construct a new Hex_format with no bounds on the. More...
 

Static Public Member Functions

static int int_to_hex (int half_byte)
 Return the hex digit for a given integer in the range 0..15. More...
 
static int hex_to_int (int hex_char)
 Return the numeric value between 0 and 15 for a given hex character, or -1 if the character is not hex. More...
 

Static Public Attributes

static constexpr Hex_case hex_case = hex_case_tp
 

Detailed Description

template<Hex_case hex_case_tp = Hex_case::lower>
struct mysql::strconv::Hex_format< hex_case_tp >

Format tag to identify hex format when encoding and decoding strings.

This also holds two member variables that bound the parsed string length (impacting only decode, not encode).

Constructor & Destructor Documentation

◆ Hex_format()

template<Hex_case hex_case_tp = Hex_case::lower>
mysql::strconv::Hex_format< hex_case_tp >::Hex_format ( )
default

Construct a new Hex_format with no bounds on the.

Member Function Documentation

◆ hex_to_int()

template<Hex_case hex_case_tp = Hex_case::lower>
static int mysql::strconv::Hex_format< hex_case_tp >::hex_to_int ( int  hex_char)
inlinestatic

Return the numeric value between 0 and 15 for a given hex character, or -1 if the character is not hex.

The behavior is undefined if the hex character is not in the range 0 to 255.

◆ int_to_hex()

template<Hex_case hex_case_tp = Hex_case::lower>
static int mysql::strconv::Hex_format< hex_case_tp >::int_to_hex ( int  half_byte)
inlinestatic

Return the hex digit for a given integer in the range 0..15.

Member Data Documentation

◆ hex_case

template<Hex_case hex_case_tp = Hex_case::lower>
constexpr Hex_case mysql::strconv::Hex_format< hex_case_tp >::hex_case = hex_case_tp
staticconstexpr

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