Logger Class Reference

#include <Logger.h>

Collaboration diagram for Logger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void addMessage (const std::string &message)
 Add a message giving information (sanity checks).
void addWarning (const std::string &message)
 Add a warning message.
void addError (const std::string &message)
 Add an error message.
void addSysInfo (const std::string &message)
 Add a system info message.
void dump (std::ostream &os)
 Dump all messages in the given output stream.
void setEchoOn ()
void setEchoOff ()
 Turn off the echo.

Static Private Attributes

static bool echoOn = false
 Specifies whether or not the echo is truned on.
static int numMessages = 0
static StringMap messageList
 Map giving the message for a given message number.
static StringMap messageType
 Map giving the message type (info, warning, ...).

Detailed Description

Class to log messages at various stages of the programs. This class is based on the monostate pattern and all logged messages go into the one and only instance


Member Function Documentation

void Logger::addError ( const std::string &  message  ) 
void Logger::addMessage ( const std::string &  message  ) 
void Logger::addSysInfo ( const std::string &  message  ) 
void Logger::addWarning ( const std::string &  message  ) 
void Logger::dump ( std::ostream &  os  ) 

Dump all messages in the given output stream.

References messageList, messageType, and numMessages.

void Logger::setEchoOff (  )  [inline]

Turn off the echo.

References echoOn.

Referenced by main().

void Logger::setEchoOn (  )  [inline]

Switch on the echo so that the message is printed (on the standard output) immediately after being logged

References echoOn.


Member Data Documentation

bool Logger::echoOn = false [static, private]

Specifies whether or not the echo is truned on.

Referenced by addMessage(), addWarning(), setEchoOff(), and setEchoOn().

StringMap Logger::messageList [static, private]

Map giving the message for a given message number.

Referenced by addError(), addMessage(), addSysInfo(), addWarning(), and dump().

StringMap Logger::messageType [static, private]

Map giving the message type (info, warning, ...).

Referenced by addError(), addMessage(), addSysInfo(), addWarning(), and dump().

int Logger::numMessages = 0 [static, private]

The total number of messages so far accumulated. This is incremented each time a new message is logged

Referenced by addError(), addMessage(), addSysInfo(), addWarning(), and dump().


The documentation for this class was generated from the following files:
Generated on Mon Oct 4 10:39:34 2010 for WfcamSrc by  doxygen 1.6.3