io_state Class Reference

class which save a stream state and restore it at dtor time More...

#include <stream_util.h>

Public Member Functions

 io_state (std::ios &stream)
 ~io_state ()
 restore the stream state

Private Attributes

std::ios & stream
std::ios::fmtflags format
std::streamsize precision
char fill

Detailed Description

class which save a stream state and restore it at dtor time

Definition at line 18 of file stream_util.h.


Constructor & Destructor Documentation

io_state::io_state ( std::ios &  stream  ) 

save the stream flags, precision and fill char.

width is restored at end of expression, there is no need to save it. tie and locale are not saved currently

error state shouldn't be saved.

io_state::~io_state (  ) 

restore the stream state

Definition at line 26 of file stream_util.cpp.

References fill, format, precision, and stream.


Field Documentation

char io_state::fill [private]

Definition at line 36 of file stream_util.h.

Referenced by ~io_state().

std::ios::fmtflags io_state::format [private]

Definition at line 34 of file stream_util.h.

Referenced by ~io_state().

std::streamsize io_state::precision [private]

Definition at line 35 of file stream_util.h.

Referenced by ~io_state().

std::ios& io_state::stream [private]

Definition at line 32 of file stream_util.h.

Referenced by ~io_state().


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

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1