Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Friends | List of all members
SCIENTIFIC Struct Reference

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

#include <JManip.hh>

Inheritance diagram for SCIENTIFIC:
WIDTH

Public Member Functions

 SCIENTIFIC (const int width, const int precision)
 Constructor. More...
 

Public Attributes

int precision
 
int width
 

Friends

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

Detailed Description

Auxiliary data structure for floating point format specification.

Definition at line 483 of file JManip.hh.

Constructor & Destructor Documentation

SCIENTIFIC::SCIENTIFIC ( const int  width,
const int  precision 
)
inline

Constructor.

Parameters
widthwidth
precisionprecision

Definition at line 492 of file JManip.hh.

493  :
494  WIDTH(width)
495  {
496  this->precision = precision;
497  }
int width
Definition: JManip.hh:256
int precision
Definition: JManip.hh:514
WIDTH(const int width)
Constructor.
Definition: JManip.hh:236

Friends And Related Function Documentation

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

Format specifier.

Parameters
outoutput stream
formatformat
Returns
output stream

Definition at line 507 of file JManip.hh.

508  {
509  using namespace std;
510 
511  return out << scientific << right << setw(format.width) << setprecision(format.precision);
512  }
int width
Definition: JManip.hh:256
int precision
Definition: JManip.hh:514

Member Data Documentation

int SCIENTIFIC::precision

Definition at line 514 of file JManip.hh.

int WIDTH::width
inherited

Definition at line 256 of file JManip.hh.


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