guanaqo 1.0.0-alpha.26
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::scoped_ostream_redirect Class Reference

#include <guanaqo/callback-streambuf.hpp>

Detailed Description

Temporarily replaces the rdbuf of the given ostream.

Flushes and restores the old rdbuf upon destruction.

Definition at line 110 of file callback-streambuf.hpp.

Collaboration diagram for guanaqo::scoped_ostream_redirect:

Public Member Functions

 scoped_ostream_redirect (std::ostream &os, std::streambuf *rdbuf)
 ~scoped_ostream_redirect ()
 scoped_ostream_redirect (const scoped_ostream_redirect &)=delete
 scoped_ostream_redirect (scoped_ostream_redirect &&other)=default
scoped_ostream_redirectoperator= (const scoped_ostream_redirect &)=delete
scoped_ostream_redirectoperator= (scoped_ostream_redirect &&)=delete

Private Attributes

std::ostream & os
std::streambuf * old_buf

Constructor & Destructor Documentation

◆ scoped_ostream_redirect() [1/3]

guanaqo::scoped_ostream_redirect::scoped_ostream_redirect ( std::ostream & os,
std::streambuf * rdbuf )
inlineexplicit

Definition at line 116 of file callback-streambuf.hpp.

Here is the caller graph for this function:

◆ ~scoped_ostream_redirect()

guanaqo::scoped_ostream_redirect::~scoped_ostream_redirect ( )
inline

Definition at line 119 of file callback-streambuf.hpp.

◆ scoped_ostream_redirect() [2/3]

guanaqo::scoped_ostream_redirect::scoped_ostream_redirect ( const scoped_ostream_redirect & )
delete
Here is the call graph for this function:

◆ scoped_ostream_redirect() [3/3]

guanaqo::scoped_ostream_redirect::scoped_ostream_redirect ( scoped_ostream_redirect && other)
default
Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

scoped_ostream_redirect & guanaqo::scoped_ostream_redirect::operator= ( const scoped_ostream_redirect & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

scoped_ostream_redirect & guanaqo::scoped_ostream_redirect::operator= ( scoped_ostream_redirect && )
delete
Here is the call graph for this function:

Member Data Documentation

◆ os

std::ostream& guanaqo::scoped_ostream_redirect::os
private

Definition at line 112 of file callback-streambuf.hpp.

◆ old_buf

std::streambuf* guanaqo::scoped_ostream_redirect::old_buf
private

Definition at line 113 of file callback-streambuf.hpp.


The documentation for this class was generated from the following file: