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