Jpp  pmt_effective_area_update
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
JFormat_t Struct Reference

Data structure for format specifications. More...

#include <JManip.hh>

Inheritance diagram for JFormat_t:
JFormat

Public Types

typedef std::ios_base::fmtflags fmtflags
 

Public Member Functions

 JFormat_t ()
 Default constructor. More...
 
 JFormat_t (const int width, const int precision=0, const fmtflags flags=fmtflags(), const char fill= ' ')
 Constructor. More...
 
 JFormat_t (std::ostream &out)
 Constructor. More...
 
bool is_valid () const
 Check validity of this manipulator. More...
 
void get (std::ostream &out)
 Get format specificaton from given output stream. More...
 
void put (std::ostream &out) const
 Put format specificaton to given output stream. More...
 

Public Attributes

int width
 
int precision
 
fmtflags flags
 
char fill
 

Friends

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

Detailed Description

Data structure for format specifications.

Definition at line 522 of file JManip.hh.

Member Typedef Documentation

typedef std::ios_base::fmtflags JFormat_t::fmtflags

Definition at line 524 of file JManip.hh.

Constructor & Destructor Documentation

JFormat_t::JFormat_t ( )
inline

Default constructor.

Definition at line 529 of file JManip.hh.

529  :
530  width (0),
531  precision(0),
532  flags (),
533  fill (' ')
534  {}
int width
Definition: JManip.hh:620
char fill
Definition: JManip.hh:623
int precision
Definition: JManip.hh:621
fmtflags flags
Definition: JManip.hh:622
JFormat_t::JFormat_t ( const int  width,
const int  precision = 0,
const fmtflags  flags = fmtflags(),
const char  fill = ' ' 
)
inline

Constructor.

Parameters
widthwidth
precisionprecision
flagsflags
fillfill character

Definition at line 545 of file JManip.hh.

548  :
549  width (width),
551  flags (flags),
552  fill (fill)
553  {}
int width
Definition: JManip.hh:620
char fill
Definition: JManip.hh:623
int precision
Definition: JManip.hh:621
fmtflags flags
Definition: JManip.hh:622
JFormat_t::JFormat_t ( std::ostream &  out)
inline

Constructor.

Parameters
outoutput stream

Definition at line 561 of file JManip.hh.

562  {
563  get(out);
564  }

Member Function Documentation

bool JFormat_t::is_valid ( ) const
inline

Check validity of this manipulator.

Returns
true if valid; else false

Definition at line 572 of file JManip.hh.

573  {
574  return (width > 0);
575  }
int width
Definition: JManip.hh:620
void JFormat_t::get ( std::ostream &  out)
inline

Get format specificaton from given output stream.

Parameters
outoutput stream

Definition at line 583 of file JManip.hh.

584  {
585  this->width = out.width();
586  this->precision = out.precision();
587  this->flags = out.flags();
588  this->fill = out.fill();
589  }
int width
Definition: JManip.hh:620
char fill
Definition: JManip.hh:623
int precision
Definition: JManip.hh:621
fmtflags flags
Definition: JManip.hh:622
void JFormat_t::put ( std::ostream &  out) const
inline

Put format specificaton to given output stream.

Parameters
outoutput stream

Definition at line 597 of file JManip.hh.

598  {
599  out.width (this->width);
600  out.precision(this->precision);
601  out.flags (this->flags);
602  out.fill (this->fill);
603  }
int width
Definition: JManip.hh:620
char fill
Definition: JManip.hh:623
int precision
Definition: JManip.hh:621
fmtflags flags
Definition: JManip.hh:622

Friends And Related Function Documentation

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

Format specifier.

Parameters
outoutput stream
formatformat
Returns
output stream

Definition at line 613 of file JManip.hh.

614  {
615  format.put(out);
616 
617  return out;
618  }
void put(std::ostream &out) const
Put format specificaton to given output stream.
Definition: JManip.hh:597

Member Data Documentation

int JFormat_t::width

Definition at line 620 of file JManip.hh.

int JFormat_t::precision

Definition at line 621 of file JManip.hh.

fmtflags JFormat_t::flags

Definition at line 622 of file JManip.hh.

char JFormat_t::fill

Definition at line 623 of file JManip.hh.


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