libMesh
Loading...
Searching...
No Matches
stream_redirector.h
Go to the documentation of this file.
1#include <libmesh/libmesh.h>
2
9{
10public:
11
16 : _errbuf(libMesh::err.rdbuf())
17 {
18 libMesh::err.rdbuf(nullptr);
19 }
20
28
29private:
30 std::streambuf * _errbuf;
31};
This class uses RAII to control redirecting the libMesh::err stream to NULL and restoring it around s...
std::streambuf * _errbuf
~StreamRedirector()
Destructor: restores the stream.
StreamRedirector()
Constructor; saves the original libMesh::err streambuf.
streambufT * rdbuf() const
Get the associated stream buffer.
The libMesh namespace provides an interface to certain functionality in the library.
OStreamProxy err