#include <utilities.h>
Public Member Functions | |
RedirectCout () | |
constructor – redirect stdout buffer to a stringstream buffer More... | |
std::string | str () const |
return the string More... | |
~RedirectCout () | |
destructor – redirect stdout buffer to its original buffer More... | |
Private Attributes | |
std::streambuf * | coutBuffer_ |
std::stringstream | ssBuffer_ |
For Python str(). Redirect std cout to a string stream so we can return a string representation of an object when it prints to cout. https://stackoverflow.com/questions/5419356/redirect-stdout-stderr-to-a-string
Definition at line 16 of file base/utilities.h.
|
inline |
constructor – redirect stdout buffer to a stringstream buffer
Definition at line 18 of file base/utilities.h.
gtsam::RedirectCout::~RedirectCout | ( | ) |
destructor – redirect stdout buffer to its original buffer
Definition at line 9 of file utilities.cpp.
std::string gtsam::RedirectCout::str | ( | ) | const |
return the string
Definition at line 5 of file utilities.cpp.
|
private |
Definition at line 28 of file base/utilities.h.
|
private |
Definition at line 27 of file base/utilities.h.