Jpp  19.1.0
the software that should make you happy
Public Member Functions | Public Attributes | Friends | List of all members
FIXED Struct Reference

Auxiliary data structure for floating point format specification. More...

#include <JManip.hh>

Inheritance diagram for FIXED:
FILL WIDTH

Public Member Functions

 FIXED (const int width, const int precision, const char fill=' ')
 Constructor. More...
 

Public Attributes

int precision
 
char fill
 
int width
 

Friends

std::ostream & operator<< (std::ostream &out, const FIXED &format)
 Format specifier. More...
 

Detailed Description

Auxiliary data structure for floating point format specification.

Definition at line 446 of file JManip.hh.

Constructor & Destructor Documentation

◆ FIXED()

FIXED::FIXED ( const int  width,
const int  precision,
const char  fill = ' ' 
)
inline

Constructor.

Parameters
widthwidth
precisionprecision
fillfill character

Definition at line 456 of file JManip.hh.

458  :
459  FILL(width, fill)
460  {
461  this->precision = precision;
462  }
char fill
Definition: JManip.hh:359
FILL(const int width=0, const char fill=' ')
Constructor.
Definition: JManip.hh:337
int precision
Definition: JManip.hh:479
int width
Definition: JManip.hh:257

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const FIXED format 
)
friend

Format specifier.

Parameters
outoutput stream
formatformat
Returns
output stream

Definition at line 472 of file JManip.hh.

473  {
474  using namespace std;
475 
476  return out << fixed << right << setfill(format.fill) << setw(format.width) << setprecision(format.precision);
477  }
Definition: JSTDTypes.hh:14

Member Data Documentation

◆ precision

int FIXED::precision

Definition at line 479 of file JManip.hh.

◆ fill

char FILL::fill
inherited

Definition at line 359 of file JManip.hh.

◆ width

int WIDTH::width
inherited

Definition at line 257 of file JManip.hh.


The documentation for this struct was generated from the following file: