Jpp
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=0, 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 361 of file JPrint.hh.

Constructor & Destructor Documentation

◆ FILL()

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

Constructor.

Parameters
widthwidth
fillfill character

Definition at line 370 of file JPrint.hh.

371  :
372  WIDTH(width)
373  {
374  this->fill = fill;
375  }

Friends And Related Function Documentation

◆ operator<<

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

Format specifier.

Parameters
outoutput stream
formatformat
Returns
output stream

Definition at line 385 of file JPrint.hh.

386  {
387  using namespace std;
388 
389  //const char c = out.fill();
390 
391  return out << setfill(format.fill) << setw(format.width);
392  }

Member Data Documentation

◆ fill

char FILL::fill

Definition at line 394 of file JPrint.hh.

◆ width

int WIDTH::width
inherited

Definition at line 292 of file JPrint.hh.


The documentation for this struct was generated from the following file:
FILL::fill
char fill
Definition: JPrint.hh:394
WIDTH::WIDTH
WIDTH(const int width)
Constructor.
Definition: JPrint.hh:273
std
Definition: jaanetDictionary.h:36
WIDTH::width
int width
Definition: JPrint.hh:292