18cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd/**
28cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd * @file stream_util.cpp
38cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd * C++ stream utility
48cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd *
58cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd * @remark Copyright 2003 OProfile authors
68cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd * @remark Read the file COPYING
78cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd *
88cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd * @author Philippe Elie
98cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd * @author John Levon
108cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd */
118cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd
128cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd#include "stream_util.h"
138cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd
148cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Doddusing namespace std;
158cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd
168cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Doddio_state::io_state(ios & stream_)
178cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	:
188cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	stream(stream_),
198cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	format(stream.flags()),
208cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	precision(stream.precision()),
218cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	fill(stream.fill())
228cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd{
238cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd}
248cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd
258cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd
268cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Doddio_state::~io_state()
278cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd{
288cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	stream.flags(format);
298cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	stream.precision(precision);
308cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd	stream.fill(fill);
318cfa702f803c5ef6a2b062a489a1b2cf66b45b5eMike Dodd}
32