Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Attributes

SgDebugToString Class Reference

Temporarily redirect IO to a string buffer for lifetime of this object. More...

#include <SgDebug.h>

List of all members.

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

Detailed Description

Temporarily redirect IO to a string buffer for lifetime of this object.

Definition at line 59 of file SgDebug.h.


Constructor & Destructor Documentation

SgDebugToString::SgDebugToString ( bool  writeToOldDebugStr  ) 

Constructor.

Parameters:
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().


Member Function Documentation

std::string SgDebugToString::GetString (  )  const

Definition at line 69 of file SgDebug.h.

References m_str.

Referenced by ~SgDebugToString().


Member Data Documentation

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().

Definition at line 72 of file SgDebug.h.

Referenced by ~SgDebugToString().


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


Sun Mar 13 2011 Doxygen 1.7.1