ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
itk::StdStreamStateSave Class Reference

#include <itkStdStreamStateSave.h>

+ Collaboration diagram for itk::StdStreamStateSave:

Detailed Description

Save a stream's format state and restore it upon destruction.

An RAII class to provide an exception safe mechanism to restore the format state of a stream. The class holds a resource (the stream's format state) and resets the resource to a default state upon destruction.

Typical usage:

itk::StdStreamStateSave coutState(std::cout);
std::cout.precision(20);
std::cout.hex();
...
return;

Definition at line 47 of file itkStdStreamStateSave.h.

Public Member Functions

 StdStreamStateSave (std::ios &stream)
 
 ~StdStreamStateSave ()
 

Private Member Functions

void operator= (const StdStreamStateSave &)
 
 StdStreamStateSave (const StdStreamStateSave &)
 

Private Attributes

std::ios & m_Ios
 
std::ios m_State
 

Constructor & Destructor Documentation

itk::StdStreamStateSave::StdStreamStateSave ( std::ios &  stream)
inlineexplicit

Definition at line 50 of file itkStdStreamStateSave.h.

References m_State.

itk::StdStreamStateSave::~StdStreamStateSave ( )
inline

Definition at line 56 of file itkStdStreamStateSave.h.

References m_Ios, and m_State.

itk::StdStreamStateSave::StdStreamStateSave ( const StdStreamStateSave )
private

Member Function Documentation

void itk::StdStreamStateSave::operator= ( const StdStreamStateSave )
private

Member Data Documentation

std::ios& itk::StdStreamStateSave::m_Ios
private

Definition at line 65 of file itkStdStreamStateSave.h.

Referenced by ~StdStreamStateSave().

std::ios itk::StdStreamStateSave::m_State
private

Definition at line 66 of file itkStdStreamStateSave.h.

Referenced by StdStreamStateSave(), and ~StdStreamStateSave().


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