Class that serves as the target for encode(..., Is_string_target), which writes to a char * buffer without bounds checking.
More...
#include <string_writer.h>
|
| | String_writer (char *first, char *last) |
| | Construct a new object backed by the given buffer. More...
|
| |
| void | resolve_format_and_write (const Is_format auto &format, const Object_t &object) |
| | Resolve the format, using the rules to deduce format based on default format and parent format, and write the given object using the resolved format. More...
|
| |
Class that serves as the target for encode(..., Is_string_target), which writes to a char * buffer without bounds checking.
◆ String_writer() [1/3]
| mysql::strconv::String_writer::String_writer |
( |
char * |
first, |
|
|
char * |
last |
|
) |
| |
|
inlineprotected |
Construct a new object backed by the given buffer.
The caller must ensure that the buffer has space for everything that will be written to it.
This is hidden from user code. These objects are only meant to be created internally by the framework.
- Parameters
-
| first | Pointer to the first character of the output buffer. |
| last | Pointer to the one-past-last character of the output buffer. |
◆ String_writer() [2/3]
| mysql::strconv::String_writer::String_writer |
( |
const String_writer & |
| ) |
|
|
delete |
◆ String_writer() [3/3]
| mysql::strconv::String_writer::String_writer |
( |
String_writer && |
| ) |
|
|
defaultnoexcept |
◆ ~String_writer()
| mysql::strconv::String_writer::~String_writer |
( |
| ) |
|
|
default |
◆ advance()
| void mysql::strconv::String_writer::advance |
( |
std::size_t |
size | ) |
|
|
inline |
Move the position size bytes forward without writing anything.
- Note
- The characters are left uninitialized. The caller must initialize them.
◆ bend() [1/2]
| std::byte * mysql::strconv::String_writer::bend |
( |
| ) |
|
|
inline |
Return the buffer end as a std::byte *.
◆ bend() [2/2]
| const std::byte * mysql::strconv::String_writer::bend |
( |
| ) |
const |
|
inline |
Return the buffer end as a const std::byte *.
◆ bpos() [1/2]
| std::byte * mysql::strconv::String_writer::bpos |
( |
| ) |
|
|
inline |
Return the current write position as a std::byte *.
◆ bpos() [2/2]
| const std::byte * mysql::strconv::String_writer::bpos |
( |
| ) |
const |
|
inline |
Return the current write position as a const std::byte *.
◆ end() [1/2]
| char * mysql::strconv::String_writer::end |
( |
| ) |
|
|
inline |
Return the buffer end as a char *.
◆ end() [2/2]
| const char * mysql::strconv::String_writer::end |
( |
| ) |
const |
|
inline |
Return the buffer end as a const char *.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ pos() [1/2]
| char * mysql::strconv::String_writer::pos |
( |
| ) |
|
|
inline |
Return the current write position as a char *.
◆ pos() [2/2]
| const char * mysql::strconv::String_writer::pos |
( |
| ) |
const |
|
inline |
Return the current write position as a const char *.
◆ remaining_size()
| std::size_t mysql::strconv::String_writer::remaining_size |
( |
| ) |
const |
|
inline |
◆ uend() [1/2]
| unsigned char * mysql::strconv::String_writer::uend |
( |
| ) |
|
|
inline |
Return the buffer end as an unsigned char *.
◆ uend() [2/2]
| const unsigned char * mysql::strconv::String_writer::uend |
( |
| ) |
const |
|
inline |
Return the buffer end as a const unsigned char *.
◆ upos() [1/2]
| unsigned char * mysql::strconv::String_writer::upos |
( |
| ) |
|
|
inline |
Return the current write position as an unsigned char *.
◆ upos() [2/2]
| const unsigned char * mysql::strconv::String_writer::upos |
( |
| ) |
const |
|
inline |
Return the current write position as a const unsigned char *.
◆ write() [1/2]
| void mysql::strconv::String_writer::write |
( |
const Is_format auto & |
format, |
|
|
const auto & |
object |
|
) |
| |
|
inline |
Write the given object to this String_writer.
◆ write() [2/2]
| void mysql::strconv::String_writer::write |
( |
const Is_format auto & |
format, |
|
|
const std::string_view & |
sv |
|
) |
| |
|
inline |
Write the given string_view to this String_writer.
◆ write_char()
| void mysql::strconv::String_writer::write_char |
( |
int |
ch | ) |
|
|
inline |
Append a single character to the buffer.
- Parameters
-
◆ write_raw()
| void mysql::strconv::String_writer::write_raw |
( |
const std::string_view & |
sv | ) |
|
|
inline |
Append a string_view to the buffer, unformatted.
- Parameters
-
◆ m_end
| char* mysql::strconv::String_writer::m_end |
|
private |
◆ m_pos
| char* mysql::strconv::String_writer::m_pos |
|
private |
The current write position.
◆ target_type
The documentation for this class was generated from the following file: