ROSE
0.9.6a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FormatRestorer.h
Go to the documentation of this file.
1
#ifndef ROSE_FormatRestorer_H
2
#define ROSE_FormatRestorer_H
3
4
#include <iostream>
5
52
class
FormatRestorer
{
53
protected
:
54
std::ostream &
stream
;
55
std::ios_base::fmtflags
fmt
;
56
57
public
:
59
FormatRestorer
(std::ostream &o):
stream
(o) {
60
save
(o);
61
}
62
64
~FormatRestorer
() {
65
restore
();
66
}
67
69
void
save
(std::ostream &o) {
70
fmt
= o.flags();
71
}
72
74
void
restore
() {
75
stream
.flags(
fmt
);
76
}
77
};
78
79
#endif
rose-edg4x
src
util
FormatRestorer.h
Generated on Mon May 5 2014 17:29:23 for ROSE by
1.8.4