LOOS  v2.3.2
loos::Fmt Class Reference

Output formatter class, adapted from Stroustrup's book. More...

#include <Fmt.hpp>

Public Types

enum  FmtAlignment { LEFT, RIGHT, INTERNAL }
 Alignment of the text.

Public Member Functions

 Fmt (uint p=6)
BoundFmt operator() (double d) const
 Returns the bound formatter. More...
Fmtscientific (void)
 Output in scientific format.
Fmtfixed (void)
 Output in fixed-point.
Fmtgeneral (void)
 Output normally (i.e. general)
Fmtprecision (const uint)
 Set the precision.
Fmtwidth (const uint)
 Set the output field width.
Fmtfill (const char)
 Set the fill character.
FmttrailingZeros (bool b=true)
 Determines whether or not trailing zeros are shown.
Fmtplus (bool b=true)
 Prepend plus sign?
Fmtleft (void)
 Align left.
Fmtright (void)
 Align right.
Fmtinternal (void)
 Align "internal" (see C++ ref)


std::ostream & operator<< (std::ostream &, const BoundFmt &)
 Create the output with the specified formatter.

Detailed Description

Output formatter class, adapted from Stroustrup's book.

Definition at line 25 of file Fmt.hpp.

Constructor & Destructor Documentation

loos::Fmt::Fmt ( uint  p = 6)

Default is for precision width 6, no zeros, padding with spaces, and left aligned (and general formatting)

Definition at line 34 of file Fmt.hpp.

Member Function Documentation

BoundFmt loos::Fmt::operator() ( double  d) const

Returns the bound formatter.

Return the bound formatter.

Definition at line 30 of file Fmt.cpp.

The documentation for this class was generated from the following files: