LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
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.
 
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)
 

Friends

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

Detailed Description

Output formatter class, adapted from Stroustrup's book.

Constructor & Destructor Documentation

◆ Fmt()

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

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

Member Function Documentation

◆ operator()()

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

Returns the bound formatter.

Return the bound formatter.


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