Home | History | Annotate | Download | only in libutil++
      1 /**
      2  * @file stream_util.cpp
      3  * C++ stream utility
      4  *
      5  * @remark Copyright 2003 OProfile authors
      6  * @remark Read the file COPYING
      7  *
      8  * @author Philippe Elie
      9  * @author John Levon
     10  */
     11 
     12 #include "stream_util.h"
     13 
     14 using namespace std;
     15 
     16 io_state::io_state(ios & stream_)
     17 	:
     18 	stream(stream_),
     19 	format(stream.flags()),
     20 	precision(stream.precision()),
     21 	fill(stream.fill())
     22 {
     23 }
     24 
     25 
     26 io_state::~io_state()
     27 {
     28 	stream.flags(format);
     29 	stream.precision(precision);
     30 	stream.fill(fill);
     31 }
     32