dune-common 3.0-git
ios_state.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_COMMON_IOS_STATE_HH
4#define DUNE_COMMON_IOS_STATE_HH
5
6#include <ios>
7
8namespace Dune {
32 {
33 public:
35 typedef std::ios_base state_type;
36
47
52
59 void restore();
60
61 private:
63 state_type& ios;
65 state_type::fmtflags oldflags;
67 std::streamsize oldprec;
69 std::streamsize oldwidth;
70 };
71
73}
74
75#endif // DUNE_COMMON_IOS_STATE_HH
~ios_base_all_saver()
Destructor that restores the flags stored by the constructor.
Definition ios_state.cc:22
void restore()
Restore flags now.
Definition ios_state.cc:27
std::ios_base state_type
Export type of object we save the state for.
Definition ios_state.hh:35
Dune namespace.
Definition alignment.hh:11
Utility class for storing and resetting stream attributes.
Definition ios_state.hh:32