00001 00002 00003 00004 //----------------------------------------------------------------------------- 00005 // CVS: $Revision: 2104 $, $Date: 2006-04-17 17:56:31 +0100 (Mon, 17 Apr 2006) $, $Author: rsc $ 00006 //----------------------------------------------------------------------------- 00007 #ifndef LOGGER_H 00008 #define LOGGER_H 00009 00010 #include <iostream> 00011 #include <string> 00012 00013 #include "DataTypes.h" 00014 //----------------------------------------------------------------------------- 00019 class Logger 00020 { 00021 public: 00023 void addMessage(const std::string& message); 00024 00026 void addWarning(const std::string& message); 00027 00029 void addError(const std::string& message); 00030 00032 void addSysInfo(const std::string& message); 00033 00035 void dump(std::ostream& os); 00036 00039 void setEchoOn() { echoOn = true; } 00040 00042 void setEchoOff() { echoOn = false; } 00043 00044 private: 00046 static bool echoOn; 00047 00050 static int numMessages; 00051 00053 static StringMap messageList; 00054 00056 static StringMap messageType; 00057 }; 00058 //----------------------------------------------------------------------------- 00059 #endif