-/**
-Resets the format to the default. Mainly used by constructors.
-*/
-Fmt &Fmt::reset()
-{
- wd=0;
- prec=6;
- spos=false;
- fillc=' ';
- base=DEC;
- sbase=false;
- fmode=EXP;
- spoint=false;
- align=RIGHT;
- ucase=false;
-
- return *this;
-}
-
-/**
-Applies the format to the given ostream. All existing formatting information
-is overwritten.
-*/
-void Fmt::apply(ostream &out) const
-{
- out.flags(((base==HEX) ? ios_base::hex : (base==OCT) ? ios_base::oct : ios_base::dec)
- | ((fmode==SCI) ? ios_base::scientific : (fmode==FIXED) ? ios_base::fixed : ios_base::fmtflags(0))
- | (fillc=='0' ? ios_base::internal : (align==LEFT) ? ios_base::left : ios_base::right)
- | (sbase ? ios_base::showbase : ios_base::fmtflags(0))
- | (spoint ? ios_base::showpoint : ios_base::fmtflags(0))
- | (spos ? ios_base::showpos : ios_base::fmtflags(0))
- | (ucase ? ios_base::uppercase : ios_base::fmtflags(0)));
- out.fill(fillc);
- out.width(wd);
- out.precision(prec);
-}
-
-/**
-Parses a printf-style conversion specification. Called from constructors.
-*/