QLogInfo.hh
Go to the documentation of this file.00001
00002 #ifndef _Q_LOG_INFO_HH_
00003 #define _Q_LOG_INFO_HH_
00004
00005 #include "QCuore.hh"
00006 #include "QMessageDefs.hh"
00007
00008 #include <string>
00009
00017 class QLogInfo
00018 {
00019 public:
00020 QLogInfo();
00021 virtual ~QLogInfo();
00022
00031 void Fill(const unsigned long& id,
00032 const MsgLevel& logLevel,
00033 const std::string& sender,
00034 const std::string& message,
00035 const time_t& msgTime = 0);
00036
00038 unsigned long GetId() const { return fMsgId; }
00039
00041 time_t GetTime() const { return fTime; }
00042
00044 MsgLevel GetLogLevel() const { return fLogLevel; }
00045
00047 const std::string& GetTimeString() const { return fTimeString; }
00048
00050 const std::string& GetSender() const { return fSender; }
00051
00053 const std::string& GetMessage() const { return fMessage; }
00054
00056 const QLogInfo& operator=(const QLogInfo& other);
00057
00058 private:
00059 unsigned long fMsgId;
00060 MsgLevel fLogLevel;
00061 time_t fTime;
00062 std::string fTimeString;
00063 std::string fSender;
00064 std::string fMessage;
00065
00076 bool EvalTimeString(const std::string& format = "%Y-%m-%d %H:%M:%S");
00077 };
00078
00079 #endif