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, const 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, const 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 192 of file iostream.h.

Constructor & Destructor Documentation

◆ scoped_estream_redirect()

scoped_estream_redirect::scoped_estream_redirect ( std::ostream &  costream = std::cerr,
const object pyostream = module_::import("sys").attr("stderr") 
)
inlineexplicit

Definition at line 194 of file iostream.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:06