Information about a single conversion specification. More...
#include <stringf.h>
Public Member Functions | |
| ConversionSpec (va_list args) | |
| const char * | Decode (const char *format) |
| longlong | GetIntArg (unsigned flags) |
| int | GetIntArg () |
| void * | GetPointerArg () |
Public Attributes | |
| va_list | Args |
| The argument list of the formatted string. | |
| uint16_t | Flags |
| Bitmask of flags from Flags. | |
| char | ConversionSpecifier |
| The character representing the format, e.g. 'd' if the format is "%d". | |
| int | FieldWidth |
| The field width, or zero if none specified. | |
| int | Precision |
| The specified precision, or -1 if none specified. | |
Private Member Functions | |
| const char * | ReadInt (const char *format, int &val) |
Information about a single conversion specification.
Definition at line 166 of file stringf.h.
| StringFormatter::ConversionSpec::ConversionSpec | ( | va_list | args | ) |
| const char * StringFormatter::ConversionSpec::Decode | ( | const char * | format | ) |
Decode the conversion specification format, and update this class members accordingly.
| format | Pointer to conversion specification. |
Definition at line 111 of file stringf.cpp.
| longlong StringFormatter::ConversionSpec::GetIntArg | ( | unsigned | flags | ) |
Get an integer argument, of a specified size, from the argument list.
| flags | Bitmask of values from Flags. Size of argument is detemined by one of: LengthMod_ll, LengthMod_l, LengthMod_h or LengthMod_hh; if none are present, 'int' is assumed. If SignedInt bit is set, the integer argument is sign extended. |
Definition at line 41 of file stringf.cpp.
| int StringFormatter::ConversionSpec::GetIntArg | ( | ) |
| void* StringFormatter::ConversionSpec::GetPointerArg | ( | ) |
| const char * StringFormatter::ConversionSpec::ReadInt | ( | const char * | format, | |
| int & | val | |||
| ) | [private] |
Read an decimal integer value from format, or if the first character is a '*', get an integer from Args.
| format | Pointer to the text to read. | |
| [out] | val | The value of the integer read, or zero if format did not point to either a decimal number or a '*'. |
Definition at line 86 of file stringf.cpp.
1.6.1