HDK
|
#include <UT_Format.h>
Public Types | |
using | W = CustomWriter |
Public Member Functions | |
Formatter () | |
Constructs a new Formatter object. More... | |
~Formatter ()=default | |
void | setReportErrors (bool flag) |
Sets whether to report format string errors or not. More... | |
void | setForceDigitGroupings (bool flag) |
size_t | format (W &writer, const char *format, std::initializer_list< ArgValue > args) |
size_t | printf (W &writer, const char *format, std::initializer_list< ArgValue > args) |
The main formatting class. This accepts a set of arguments and can subsequently format them in various ways.
Definition at line 516 of file UT_Format.h.
using UT::Format::Formatter::W = CustomWriter |
Definition at line 519 of file UT_Format.h.
|
inline |
Constructs a new Formatter object.
Definition at line 522 of file UT_Format.h.
|
default |
size_t UT::Format::Formatter::format | ( | W & | writer, |
const char * | format, | ||
std::initializer_list< ArgValue > | args | ||
) |
Format the arguments into the writer, using the format string given. Returns the number of bytes written.
writer | A functor that does the writing of the formatted output. See CustomWriter for an example of how to do a custom writer. |
format | The formatting codes, as defined in Format Grammar. If nullptr; will be treated as space separated {} for each argument. |
args | An initializer list that forms the list of arguments to bake into the formatted result using the format string. |
writer
functor. size_t UT::Format::Formatter::printf | ( | W & | writer, |
const char * | format, | ||
std::initializer_list< ArgValue > | args | ||
) |
Format the arguments into the writer, using the format string given. Returns the number of bytes written.
writer | A functor that does the writing of the formatted output. See CustomWriter for an example of how to do a custom writer. |
format | The formatting codes, as defined by std::printf If nullptr; will be treated as space separated {} for each argument. |
args | An initializer list that forms the list of arguments to bake into the formatted result using the format string. |
writer
functor.
|
inline |
Sets whether to force numbers to print with digit grouping. Otherwise only the ',' (format), or '\'' (printf) flags dictate whether digit grouping is done.
Definition at line 533 of file UT_Format.h.
|
inline |
Sets whether to report format string errors or not.
Definition at line 528 of file UT_Format.h.