Public Member Functions | Private Member Functions | Private Attributes

cmtk::Console Class Reference
[cmtkSystem Library]

Standard error output console for library. More...

#include <cmtkConsole.h>

Inheritance diagram for cmtk::Console:
Inheritance graph
[legend]
Collaboration diagram for cmtk::Console:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Console (std::ostream &stream)
 Constructor.
size_t GetLineWidth () const
 Get terminal line width, if possible.
ConsoleFormatText (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 >
Consoleoperator<< (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.

Detailed Description

Standard error output console for library.

Definition at line 58 of file cmtkConsole.h.


Constructor & Destructor Documentation

cmtk::Console::Console ( std::ostream &  stream ) [inline]

Constructor.

Definition at line 64 of file cmtkConsole.h.


Member Function Documentation

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

template<class T >
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().


Member Data Documentation

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.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines