Standard error output console for library. More...
#include <cmtkConsole.h>
Public Member Functions | |
Console (std::ostream &stream) | |
Constructor. | |
size_t | GetLineWidth () const |
Get terminal line width, if possible. | |
Console & | FormatText (const std::string &text, const size_t margin=0, const size_t width=0, const int firstLine=0) |
Format text with line breaks etc. | |
void | printf (const char *format,...) |
Formatted output. | |
void | flush () |
Flush output stream. | |
template<class T > | |
Console & | operator<< (const T data) |
Output stream operator. | |
void | indent () |
Increment indentation level. | |
void | unindent () |
Decrement indentation level. | |
Private Member Functions | |
void | Indent (size_t level=0) |
Perform indentation. | |
Private Attributes | |
std::ostream & | m_Stream |
The system stream that we're attaching to. | |
size_t | IndentLevel |
Indentiation level. | |
int | DebugLevel |
Indentiation level. | |
MutexLock | m_MutexLock |
Mutex lock for thread safety. |
Standard error output console for library.
Definition at line 58 of file cmtkConsole.h.
cmtk::Console::Console | ( | std::ostream & | stream ) | [inline] |
Constructor.
Definition at line 64 of file cmtkConsole.h.
void cmtk::Console::flush | ( | ) | [inline] |
Flush output stream.
Definition at line 88 of file cmtkConsole.h.
Referenced by cmtk::AtlasSegmentation::RegisterAffine(), and cmtk::AtlasSegmentation::RegisterSpline().
void cmtk::Console::indent | ( | ) | [inline] |
Increment indentation level.
Definition at line 109 of file cmtkConsole.h.
Referenced by cmtk::ScalarImage::Print().
Console& cmtk::Console::operator<< | ( | const T | data ) | [inline] |
Output stream operator.
Definition at line 96 of file cmtkConsole.h.
void cmtk::Console::unindent | ( | ) | [inline] |
Decrement indentation level.
Definition at line 112 of file cmtkConsole.h.
Referenced by cmtk::ScalarImage::Print().
int cmtk::Console::DebugLevel [private] |
Indentiation level.
Definition at line 125 of file cmtkConsole.h.
size_t cmtk::Console::IndentLevel [private] |
Indentiation level.
Definition at line 119 of file cmtkConsole.h.
MutexLock cmtk::Console::m_MutexLock [private] |
Mutex lock for thread safety.
Definition at line 128 of file cmtkConsole.h.
std::ostream& cmtk::Console::m_Stream [private] |
The system stream that we're attaching to.
Definition at line 116 of file cmtkConsole.h.