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

Auxiliary data structure for sequence of same character. More...

#include <JPrint.hh>

Inheritance diagram for FILL:
WIDTH

Public Member Functions

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

Public Attributes

char fill
 
int width
 

Friends

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

Detailed Description

Auxiliary data structure for sequence of same character.

Definition at line 342 of file JPrint.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
widthwidth
fillfill character

Definition at line 351 of file JPrint.hh.

352  :
353  WIDTH(width)
354  {
355  this->fill = fill;
356  }
int width
Definition: JPrint.hh:273
WIDTH(const int width)
Constructor.
Definition: JPrint.hh:254
char fill
Definition: JPrint.hh:374

Friends And Related Function Documentation

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

Format specifier.

Parameters
outoutput stream
formatformat
Returns
output stream

Definition at line 365 of file JPrint.hh.

366  {
367  using namespace std;
368 
369  const char c = out.fill();
370 
371  return out << setfill(format.fill) << setw(format.width) << format.fill << setfill(c);
372  }
int width
Definition: JPrint.hh:273
char fill
Definition: JPrint.hh:374

Member Data Documentation

char FILL::fill

Definition at line 374 of file JPrint.hh.

int WIDTH::width
inherited

Definition at line 273 of file JPrint.hh.


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