This class can be used to temporarily redirect one output (input) stream to another output (input) stream.
More...
#include <JRedirectStream.hh>
|
std::ios & | ios |
|
std::streambuf * | p |
|
This class can be used to temporarily redirect one output (input) stream to another output (input) stream.
The destructor restores the internal buffer of the first output (input) stream.
Definition at line 24 of file JRedirectStream.hh.
◆ JRedirectStream() [1/2]
JLANG::JRedirectStream::JRedirectStream |
( |
std::ostream & |
from, |
|
|
std::ostream & |
to |
|
) |
| |
|
inline |
Constructor.
The output stream from is redirected to output stream to.
- Parameters
-
from | output stream |
to | output stream |
Definition at line 35 of file JRedirectStream.hh.
41 ios.rdbuf(to.rdbuf());
◆ JRedirectStream() [2/2]
JLANG::JRedirectStream::JRedirectStream |
( |
std::istream & |
from, |
|
|
std::istream & |
to |
|
) |
| |
|
inline |
Constructor.
The input stream from is redirected to input stream to.
- Parameters
-
from | input stream |
to | input stream |
Definition at line 52 of file JRedirectStream.hh.
58 ios.rdbuf(to.rdbuf());
◆ ~JRedirectStream()
JLANG::JRedirectStream::~JRedirectStream |
( |
| ) |
|
|
inline |
◆ getStatus()
virtual bool JLANG::JRedirectStream::getStatus |
( |
| ) |
const |
|
inlinevirtual |
◆ operator bool()
JLANG::JAbstractObjectStatus::operator bool |
( |
| ) |
const |
|
inlineinherited |
◆ operator!()
bool JLANG::JAbstractObjectStatus::operator! |
( |
| ) |
const |
|
inlineinherited |
◆ ios
std::ios& JLANG::JRedirectStream::ios |
|
private |
std::streambuf* JLANG::JRedirectStream::p |
|
private |
The documentation for this class was generated from the following file: