Dune Core Modules (2.8.0)

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
Utility class for storing and resetting stream attributes.
Definition: ios_state.hh:32
~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
ios_base_all_saver(state_type &ios_)
Constructor that stores the currently used flags.
Definition: ios_state.cc:17
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)