Evo C++ Library v0.5.1
|
#include <evo/iobase.h>
Stream output formatter with state.
Example using File:
Example using Console (stdout):
For more examples see: Stream Formatting
Public Types | |
typedef T | Out |
Associated output stream type, type returned by write_out() More... | |
typedef T::Size | Size |
Data size type (ulong) More... | |
typedef StreamFormatter< T > | This |
This type. More... | |
Public Member Functions | |
StreamFormatter (Out &out) | |
Constructor. More... | |
StreamFormatter (const This &src) | |
Copy constructor. More... | |
This & | operator<< (FmtAlign align) |
Set field alignment type to use. More... | |
This & | operator<< (FmtWidth width) |
Set field width to use. More... | |
This & | operator<< (const FmtSetField &field) |
Set field attributes to use. More... | |
This & | operator<< (Newline nl) |
Write an explicit newline and flush stream. More... | |
This & | operator<< (NewlineDefault nl) |
Write default newline and flush stream. More... | |
This & | operator<< (const NewlineValue &nl) |
Write newline value and flush stream. More... | |
This & | operator<< (Flush) |
Flush buffer by writing to stream. More... | |
This & | operator<< (const FmtSetNull &null) |
Set attributes for null values. More... | |
This & | operator<< (bool val) |
Append a bool value. More... | |
This & | operator<< (char ch) |
Append a character. More... | |
This & | operator<< (const FmtChar &ch) |
Append a repeated character. More... | |
This & | operator<< (const FmtString &str) |
Append a formatted string. More... | |
This & | operator<< (const char *val) |
Append a terminated string. More... | |
template<class TSize > | |
This & | operator<< (const ListBase< char, TSize > &str) |
Append a string. More... | |
This & | operator<< (FmtBase base) |
Set base for formatting integers. More... | |
This & | operator<< (FmtBasePrefix prefix) |
Set prefix for formatting integers. More... | |
This & | operator<< (const FmtSetInt &fmt_int) |
Set integer formatting attributes. More... | |
This & | operator<< (short num) |
Append a formatted signed integer. More... | |
This & | operator<< (int num) |
Append a formatted signed integer. More... | |
This & | operator<< (long num) |
Append a formatted signed integer. More... | |
This & | operator<< (longl num) |
Append a formatted signed integer. More... | |
This & | operator<< (ushort num) |
Append a formatted unsigned integer. More... | |
This & | operator<< (uint num) |
Append a formatted unsigned integer. More... | |
This & | operator<< (ulong num) |
Append a formatted unsigned integer. More... | |
This & | operator<< (ulongl num) |
Append a formatted unsigned integer. More... | |
template<class U > | |
This & | operator<< (const IntegerT< U > &num) |
Append a formatted integer class. More... | |
This & | operator<< (FmtPrecision prec) |
Set floating point formatting precision. More... | |
This & | operator<< (const FmtSetFloat &fmt_flt) |
Set floating point formatting attributes. More... | |
This & | operator<< (float num) |
Append a formatting floating point number. More... | |
This & | operator<< (double num) |
Append a formatting floating point number. More... | |
This & | operator<< (ldouble num) |
Append a formatting floating point number. More... | |
template<class U > | |
This & | operator<< (const FloatT< U > &num) |
Append a formatted integer class. More... | |
This & | operator<< (const FmtPtr &fmtptr) |
Writer formatted pointer field to stream. More... | |
This & | operator<< (const FmtDump &fmtdump) |
Write formatted data dump to stream. More... | |
This & | operator= (const This &src) |
Assignment operator copies attributes. More... | |
Out & | write_out () |
Get parent output string. More... | |
Public Attributes | |
FmtAttribs | fmt |
Formatting attributes (state) More... | |
Out & | out |
Associated output stream. More... | |
typedef T Out |
Associated output stream type, type returned by write_out()
typedef T::Size Size |
Data size type (ulong)
typedef StreamFormatter<T> This |
This type.
|
inline |
Constructor.
out | Output stream to associate and format to |
|
inline |
Copy constructor.
src | Source to copy |
Set field alignment type to use.
align | Alignment type |
Set field width to use.
width | Field width to use |
|
inline |
Set field attributes to use.
field | Field attributes |
|
inline |
Write default newline and flush stream.
nl | Default newline value (NL), where default is set by the stream |
|
inline |
Write newline value and flush stream.
nl | Newline value to use, use current stream default if null |
Flush buffer by writing to stream.
|
inline |
|
inline |
|
inline |
Append a character.
ch | Character to append |
Append a repeated character.
ch | Character info to append |
Append a formatted string.
str | String info to append |
|
inline |
Append a terminated string.
val | String pointer, must be terminated, NULL for null string |
Append a string.
str | String value |
Set base for formatting integers.
base | Base to use, see FmtBase |
|
inline |
Set prefix for formatting integers.
prefix | Integer prefix to use, see FmtBasePrefix |
Set integer formatting attributes.
fmt_int | Integer formatting attributes |
|
inline |
Append a formatted signed integer.
num | Integer to format |
|
inline |
Append a formatted signed integer.
num | Integer to format |
|
inline |
Append a formatted signed integer.
num | Integer to format |
|
inline |
Append a formatted signed integer.
num | Integer to format |
|
inline |
Append a formatted unsigned integer.
num | Integer to format |
|
inline |
Append a formatted unsigned integer.
num | Integer to format |
|
inline |
Append a formatted unsigned integer.
num | Integer to format |
|
inline |
Append a formatted unsigned integer.
num | Integer to format |
Append a formatted integer class.
T | Integer POD type, deduced from arguments |
num | Integer to format (Int, UInt, etc) |
|
inline |
Set floating point formatting precision.
prec | Precision value, see FmtPrecision |
|
inline |
Set floating point formatting attributes.
fmt_flt | Floating point formatting attributes |
|
inline |
Append a formatting floating point number.
num | Number to format |
|
inline |
Append a formatting floating point number.
num | Number to format |
|
inline |
Append a formatting floating point number.
num | Number to format |
Append a formatted integer class.
T | Floating point POD type, deduced from arguments |
num | Number to format (Float, FloatD, etc) |
Writer formatted pointer field to stream.
fmtptr | Pointer info |
Write formatted data dump to stream.
fmtdump | Dump info |
Assignment operator copies attributes.
src | Source to copy attributes from |
|
inline |
Get parent output string.
FmtAttribs fmt |
Formatting attributes (state)
Out& out |
Associated output stream.