HDK
|
#include <UT_Format.h>
Public Types | |
using | WriterType = W |
Public Member Functions | |
Formatter () | |
Constructs a new Formatter object. More... | |
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 | format (W &writer, const char *format, const ArgValue args[], size_t nb_args) |
size_t | printf (W &writer, const char *format, std::initializer_list< ArgValue > args) |
size_t | printf (W &writer, const char *format, const ArgValue args[], size_t nb_args) |
Additional Inherited Members | |
![]() | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
The main formatting class. This accepts a set of arguments and can subsequently format them in various ways.
Definition at line 652 of file UT_Format.h.
using UT::Format::Formatter< W >::WriterType = W |
Definition at line 675 of file UT_Format.h.
|
inline |
Constructs a new Formatter object.
Definition at line 678 of file UT_Format.h.
size_t UT::Format::Formatter< W >::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. |
args | An initializer list that forms the list of arguments to bake into the formatted result using the format string. |
writer
functor. Definition at line 947 of file UT_FormatImpl.h.
size_t UT::Format::Formatter< W >::format | ( | W & | writer, |
const char * | format, | ||
const ArgValue | args[], | ||
size_t | nb_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. |
args | An array of arguments to bake into the formatted result using the format string. |
nb_args | The number of items in the argument array passed in. |
writer
functor. Definition at line 956 of file UT_FormatImpl.h.
size_t UT::Format::Formatter< W >::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 |
args | An initializer list that forms the list of arguments to bake into the formatted result using the format string. |
writer
functor. Definition at line 1019 of file UT_FormatImpl.h.
size_t UT::Format::Formatter< W >::printf | ( | W & | writer, |
const char * | format, | ||
const ArgValue | args[], | ||
size_t | nb_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 |
args | An array of arguments to bake into the formatted result using the format string. |
nb_args | The number of items in the argument array passed in. |
writer
functor. Definition at line 1027 of file UT_FormatImpl.h.
|
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 689 of file UT_Format.h.
|
inline |
Sets whether to report format string errors or not.
Definition at line 684 of file UT_Format.h.