Public Member Functions | List of all members
scoped_estream_redirect Class Reference

#include <iostream.h>

Inheritance diagram for scoped_estream_redirect:
Inheritance graph
[legend]

Public Member Functions

 scoped_estream_redirect (std::ostream &costream=std::cerr, object pyostream=module::import("sys").attr("stderr"))
 
- Public Member Functions inherited from scoped_ostream_redirect
scoped_ostream_redirectoperator= (const scoped_ostream_redirect &)=delete
 
scoped_ostream_redirectoperator= (scoped_ostream_redirect &&)=delete
 
 scoped_ostream_redirect (std::ostream &costream=std::cout, object pyostream=module::import("sys").attr("stdout"))
 
 scoped_ostream_redirect (const scoped_ostream_redirect &)=delete
 
 scoped_ostream_redirect (scoped_ostream_redirect &&other)=default
 
 ~scoped_ostream_redirect ()
 

Additional Inherited Members

- Protected Attributes inherited from scoped_ostream_redirect
detail::pythonbuf buffer
 
std::ostream & costream
 
std::streambuf * old
 

Detailed Description

Like scoped_ostream_redirect, but redirects cerr by default. This class is provided primary to make py::call_guard easier to make.

.. code-block:: cpp

m.def("noisy_func", &noisy_func, py::call_guard<scoped_ostream_redirect, scoped_estream_redirect>());

Definition at line 145 of file iostream.h.

Constructor & Destructor Documentation

scoped_estream_redirect::scoped_estream_redirect ( std::ostream &  costream = std::cerr,
object  pyostream = module::import("sys").attr("stderr") 
)
inline

Definition at line 147 of file iostream.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:54