MySQL 9.6.0
Source Code Documentation
strconv.h
Go to the documentation of this file.
1// Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2//
3// This program is free software; you can redistribute it and/or modify
4// it under the terms of the GNU General Public License, version 2.0,
5// as published by the Free Software Foundation.
6//
7// This program is designed to work with certain software (including
8// but not limited to OpenSSL) that is licensed under separate terms,
9// as designated in a particular file or component or in included license
10// documentation. The authors of MySQL hereby grant you an additional
11// permission to link the program and your derivative works with the
12// separately licensed software that they have either included with
13// the program or referenced in the documentation.
14//
15// This program is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License, version 2.0, for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with this program; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
24#ifndef MYSQL_STRCONV_STRCONV_H
25#define MYSQL_STRCONV_STRCONV_H
26
27/// @file
28/// Experimental API header
29///
30/// This is a high-level header, intended for users to include in order to
31/// import all the decode functionality.
32
33// ==== Formats ====
34
35// Files are listed in order from more primitive to more complex; files closer
36// to the top can't include files closer to the bottom.
37
38// Base class for format type tags.
40
41// Internal logic to determine the format to use when invoking
42// `decode_impl`
44
45// ==== Pre-defined formats ====
46
47// Integers in ascii, strings copied verbatim.
49
50// Various internal objects written in ascii, for debugging purposes.
52
53// Strings in hex format.
55
56// Strings in escaped format.
58
59// Integers in variable-length binary format, strings as length+data.
61
62// Integers in fixed-length binary format, strings as Binary_format.
64
65// Strings of fixed length (decoder must know the size).
67
68// ==== Generic functionality to write to strings ====
69
70// `out_str_*`, wrappers around output strings.
72
73// String target, the common base for String_writer and String_counter
75
76// String_counter, a String target that counts characters.
78
79// String_writer, a String target that writes to a buffer.
81
82// Helper function to write to an `out_str_*` through String_targets.
84
85// ==== Objects to hold parse options ====
86
87// Repeat: represents the number of times a parsed object is repeated.
89
90// Helper for Checkers: invocables used to validate an object after parsing.
92
93// Parse_options: uniform API to access parse options defined as Format, Repeat,
94// Checker, or any combination of them.
96
97// ==== Generic functionality to parse objects from strings ====
98
99// Parse_position, holding the parsed string and the current parse position.
101
102// enum Parse_status: the internal states of Parse_result.
104
105// class Parse_result, holding the status, error message, and logic to propagate
106// status from callee to caller.
108
109// Parse_position + Parse_result + members to read sub-objects
111
112// Fluent API, which allows us to write parsers with fewer error cases and more
113// declarative syntax.
115
116// ==== API functions parameterized by format ====
117
118// End user API, which parses a given string using a Parser object.
120
121// End user API, which parses a given string using a Parser object.
123
124// ==== API functions to concatenate multiple objects ====
125
126// Helper type used by concat.
128
129// Concatenate multiple objects.
131
132// ==== API functions for specific formats ====
133
134// `encode_text` and `compute_encoded_length_text`
136
137// `encode_debug` and `compute_encoded_length_debug`
139
140// `decode_text`
142
143// ==== Formatters and parsers for integers and strings ====
144
145// Parser for strings without the length encoded.
147
148// Integers in ascii, strings copied verbatim.
150
151// Strings in hex format.
153
154// Strings in escaped format.
156
157// Integers in variable-length binary format, strings as length+data.
159
160// Integers in fixed-length binary format.
162
163// ==== Formatters for more specialized types ====
164
165// Format a Parser object as a text containing an error message.
167
168// Format Parse_status and Repeat objects, for debugging.
170
171// Format std::source_location objects, for debugging.
173
174// ==== Helpers to identify and skip whitespace ====
175
176// Identify whitespace characters, and skip whitespace from a Parser_state
178
179#endif // ifndef MYSQL_STRCONV_STRCONV_H
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.
Experimental API header.