Class format holds 3 flags for format, width and precision; use with std ostream operator <<
Definition at line 51 of file format.hpp.
#include <format.hpp>
Public Member Functions | |
| format & | fix () |
| Set format to fixed. More... | |
| format & | fixed () |
| Set format to fixed. More... | |
| format (int w, int p, int f=1) | |
| Constructor. More... | |
| format & | gen () |
| Set format to general. More... | |
| format & | general () |
| Set format to general. More... | |
| format & | p (int p) |
| Set precision to p digits. More... | |
| format & | precision (int p) |
| Set precision to p digits. More... | |
| format & | sci () |
| Set format to scientific. More... | |
| format & | scientific () |
| Set format to scientific. More... | |
| format & | w (int w) |
| Set width to w characters. More... | |
| format & | width (int w) |
| Set width to w characters. More... | |
| format & | wp (int w, int p) |
| Set both width and precision. More... | |
Private Attributes | |
| int | form |
| int | prec |
| precision in char More... | |
| int | wide |
| 0=general,1=float,2=scientific, default is 1 More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const format &f) |
| ostream operator for format More... | |
|
inlineexplicit |
Constructor.
Definition at line 59 of file format.hpp.
|
inline |
Set format to fixed.
Definition at line 83 of file format.hpp.
|
inline |
Set format to fixed.
Definition at line 76 of file format.hpp.
|
inline |
Set format to general.
Definition at line 97 of file format.hpp.
|
inline |
Set format to general.
Definition at line 90 of file format.hpp.
|
inline |
Set precision to p digits.
Definition at line 125 of file format.hpp.
|
inline |
Set precision to p digits.
Definition at line 118 of file format.hpp.
|
inline |
Set format to scientific.
Definition at line 69 of file format.hpp.
|
inline |
Set format to scientific.
Definition at line 62 of file format.hpp.
|
inline |
Set width to w characters.
Definition at line 111 of file format.hpp.
|
inline |
Set width to w characters.
Definition at line 104 of file format.hpp.
|
inline |
Set both width and precision.
Definition at line 132 of file format.hpp.
|
private |
Definition at line 53 of file format.hpp.
|
private |
precision in char
Definition at line 55 of file format.hpp.
|
private |
0=general,1=float,2=scientific, default is 1
width in char
Definition at line 54 of file format.hpp.