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

Auxiliary class to temporarily modify format specifications. More...

#include <JPrint.hh>

Public Member Functions

 JFlags (std::ostream &out)
 Constructor. More...
 
 JFlags (std::ostream &out, std::ios::fmtflags flags)
 Constructor. More...
 
 JFlags (std::ostream &out, std::ios::fmtflags flags, std::ios::fmtflags mask)
 Constructor. More...
 
 ~JFlags ()
 Destructor. More...
 

Protected Attributes

std::ostream & __out
 
std::ios::fmtflags __flags
 
std::ios::fmtflags __mask
 

Detailed Description

Auxiliary class to temporarily modify format specifications.

Definition at line 535 of file JPrint.hh.

Constructor & Destructor Documentation

JFlags::JFlags ( std::ostream &  out)
inline

Constructor.

Parameters
outoutput stream

Definition at line 541 of file JPrint.hh.

541  :
542  __out(out)
543  {
544  __flags = out.flags();
545  }
std::ostream & __out
Definition: JPrint.hh:590
std::ios::fmtflags __flags
Definition: JPrint.hh:591
JFlags::JFlags ( std::ostream &  out,
std::ios::fmtflags  flags 
)
inline

Constructor.

Parameters
outoutput stream
flagsformat flags

Definition at line 554 of file JPrint.hh.

554  :
555  __out(out)
556  {
557  __flags = out.flags();
558 
559  out.setf(flags);
560  }
std::ostream & __out
Definition: JPrint.hh:590
std::ios::fmtflags __flags
Definition: JPrint.hh:591
JFlags::JFlags ( std::ostream &  out,
std::ios::fmtflags  flags,
std::ios::fmtflags  mask 
)
inline

Constructor.

Parameters
outoutput stream
flagsformat flags
maskformat mask

Definition at line 570 of file JPrint.hh.

570  :
571  __out(out)
572  {
573  __flags = out.flags();
574 
575  out.setf(flags, mask);
576  }
std::ostream & __out
Definition: JPrint.hh:590
std::ios::fmtflags __flags
Definition: JPrint.hh:591
JFlags::~JFlags ( )
inline

Destructor.

This destructor restores the old format specifications.

Definition at line 584 of file JPrint.hh.

585  {
586  __out.flags(__flags);
587  }
std::ostream & __out
Definition: JPrint.hh:590
std::ios::fmtflags __flags
Definition: JPrint.hh:591

Member Data Documentation

std::ostream& JFlags::__out
protected

Definition at line 590 of file JPrint.hh.

std::ios::fmtflags JFlags::__flags
protected

Definition at line 591 of file JPrint.hh.

std::ios::fmtflags JFlags::__mask
protected

Definition at line 592 of file JPrint.hh.


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