Temporarily redirect IO to a string buffer for lifetime of this object. More...
#include <SgDebug.h>
Public Member Functions | |
SgDebugToString (bool writeToOldDebugStr) | |
Constructor. | |
~SgDebugToString () | |
std::string | GetString () const |
Private Attributes | |
bool | m_writeToOldDebugStr |
std::ostringstream | m_str |
std::ostream * | m_old |
Temporarily redirect IO to a string buffer for lifetime of this object.
Definition at line 59 of file SgDebug.h.
SgDebugToString::SgDebugToString | ( | bool | writeToOldDebugStr | ) |
Constructor.
writeToOldDebugStr | Also write the content of the string to the old stream, after it was reset in the desctructor. |
Definition at line 98 of file SgDebug.cpp.
References m_old, m_str, and SgSwapDebugStr().
SgDebugToString::~SgDebugToString | ( | ) |
Definition at line 104 of file SgDebug.cpp.
References GetString(), m_old, m_writeToOldDebugStr, and SgSwapDebugStr().
std::string SgDebugToString::GetString | ( | ) | const |
std::ostream* SgDebugToString::m_old [private] |
Definition at line 76 of file SgDebug.h.
Referenced by SgDebugToString(), and ~SgDebugToString().
std::ostringstream SgDebugToString::m_str [private] |
Definition at line 74 of file SgDebug.h.
Referenced by GetString(), and SgDebugToString().
bool SgDebugToString::m_writeToOldDebugStr [private] |
Definition at line 72 of file SgDebug.h.
Referenced by ~SgDebugToString().