Contains a ready-to-use formatter. The LexicalFormatter parses and store formatter information. The LexicalFormatterActor applies the formatting on a data of any primitive type.
Example: LexicalFormatter f("+10.5d"); int value = -52; char buffer[10]; char *p = LexicalFormatterActor<int>::format(f, value, buffer, 10); // now p points to a part of buffer which contains " -00052"
The actual format is described using a printf-like formatter string. Beware that there may be differences between the standard printf format string and this formatter specification (mostly because this one allows slightly more combinaisons).
The general format syntax is: [flags][width][.precision][type]
If the type is omitted, then the formatter will apply to all data types, using the flags, witdh and precision as much as possible each time.
Integer Formatters:
flags + For signed integers, print a plus sign if positive ( For signed integers, display negative values in parenthesis # Prefix the octal and hexadecimal reprenstation with '0' (octal) or '0x' (lower case hexadecimal) or '0X' (upper case hexadecimal) ' Separate digits in groups < Left align within field = Center within field > Right align within field width The minimum width of the field precision The minimum number of significant digits type d Signed integer, decimal representation u Unsigned integer, decimal representation x Lower-case hexadecimal representation X Upper-case hexadecimal representation o octal representation
1.3-rc2