QLogInfo Class Reference
[Networking]

List of all members.


Detailed Description

container class used to store message informations received by message logger server

Author:
sergio.didomizio@ge.infn.it

Public Member Functions

void Fill (const unsigned long &id, const MsgLevel &logLevel, const std::string &sender, const std::string &message, const time_t &msgTime=0)
 fill this object with message informations
unsigned long GetId () const
 get message id
time_t GetTime () const
 get message time (unix time format)
MsgLevel GetLogLevel () const
 get log level
const std::string & GetTimeString () const
 get message time as string (format: YYYY-mm-DD-HH-MM-ss)
const std::string & GetSender () const
 get message sender
const std::string & GetMessage () const
 get message text
const QLogInfooperator= (const QLogInfo &other)
 all the data members are coped to the new object

Private Member Functions

bool EvalTimeString (const std::string &format="%Y-%m-%d %H:%M:%S")
 fill fTimeString using the time value in fTime and the specified format

Private Attributes

unsigned long fMsgId
MsgLevel fLogLevel
time_t fTime
std::string fTimeString
std::string fSender
std::string fMessage

Member Function Documentation

void QLogInfo::Fill ( const unsigned long &  id,
const MsgLevel &  logLevel,
const std::string &  sender,
const std::string &  message,
const time_t &  msgTime = 0 
)

fill this object with message informations

Parameters:
id unique message identifier
logLevel log level as defined in QMessageDefs.hh
sender message sender
message message text
msgTime unix time of log message. 0 (default) is now

References EvalTimeString().

Referenced by QMsgClient::GetMessage(), and QGuiControlWindow::SetFormattedMessage().

bool QLogInfo::EvalTimeString ( const std::string &  format = "%Y-%m-%d %H:%M:%S"  )  [private]

fill fTimeString using the time value in fTime and the specified format

Parameters:
format time string format, as defined in strftime. A default format is assumed ("%Y-%m-%d %H:%M:%S") if no arguments are supplied to this function.
Returns:
true unless the call to strftime() returns 0 (see man strftime for possible reasons). When returning false, this function sets fTimeString to "".

Referenced by Fill().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:07 2010 for CUORE Software by  doxygen 1.5.6